<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>Media Queries Level 4</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="refining" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="<a>Media Queries</a> allow authors to test and query values or features of the user agent or display device, independent of the document being rendered.  They are used in the CSS @media rule to conditionally apply styles to a document, and in various other contexts and languages, such as HTML and JavaScript.    Media Queries Level 4 describes the mechanism and syntax of media queries, media types, and media features. It extends and supersedes the features defined in Media Queries Level 3." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://www.w3.org/TR/mediaqueries-4/" rel="canonical">
<style>
			#pointer-hover-table { margin: 1em auto; text-align: center; border-collapse: collapse; max-width: 40em; }
			#pointer-hover-table td, #pointer-hover-table th { padding: .5em; }
			#pointer-hover-table thead tr+tr th { border-bottom: 1px solid silver; }
			#pointer-hover-table tbody td:first-of-type { border-left: 1px solid silver; }
		</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-caniuse-panel */

            .caniuse-status { font: 1em sans-serif; width: 9em; padding: 0.3em; position: absolute; z-index: 8; top: auto; right: 0.3em; background: #EEE; color: black; box-shadow: 0 0 3px #999; overflow: hidden; border-collapse: initial; border-spacing: initial; }
            .caniuse-status.wrapped { width: 1em; height: 1em; }
            .caniuse-status.wrapped > :not(input) { display: none; }
            .caniuse-status > input { position: absolute; right: 0; top: 0; width: 1em; height: 1em; border: none; background: transparent; padding: 0; margin: 0; }
            .caniuse-status > p { font-size: 0.6em; margin: 0; padding: 0; }
            .caniuse-status > p + p { padding-top: 0.5em; }
            .caniuse-status > .support { display: block; }
            .caniuse-status > .support > span { padding: 0.2em 0; display: block; display: table; }
            .caniuse-status > .support > span.partial { color: #666666; filter: grayscale(50%); }
            .caniuse-status > .support > span.no { color: #CCCCCC; filter: grayscale(100%); }
            .canisue-status > .support > span.no::before { opacity: 0.5; }
            .caniuse-status > .support > span:first-of-type { padding-top: 0.5em; }
            .caniuse-status > .support > span > span { padding: 0 0.5em; display: table-cell; vertical-align: top; }
            .caniuse-status > .support > span > span:first-child { width: 100%; }
            .caniuse-status > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; }
            .caniuse-status > .support > span::before { content: ' '; display: table-cell; min-width: 1.5em; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; }
            .caniuse-status > .support > .and_chr::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); }
            .caniuse-status > .support > .and_ff::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); }
            .caniuse-status > .support > .and_uc::before { background-image: url(https://resources.whatwg.org/browser-logos/uc.png); } /* UC Browser for Android */
            .caniuse-status > .support > .android::before { background-image: url(https://resources.whatwg.org/browser-logos/android.svg); }
            .caniuse-status > .support > .bb::before { background-image: url(https://resources.whatwg.org/browser-logos/bb.jpg); } /* Blackberry Browser */
            .caniuse-status > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); }
            .caniuse-status > .support > .edge::before { background-image: url(https://resources.whatwg.org/browser-logos/edge.svg); }
            .caniuse-status > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); }
            .caniuse-status > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); }
            .caniuse-status > .support > .ie_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/ie-mobile.svg); }
            .caniuse-status > .support > .ios_saf::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); }
            .caniuse-status > .support > .op_mini::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mini.png); }
            .caniuse-status > .support > .op_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); }
            .caniuse-status > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); }
            .caniuse-status > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); }
            .caniuse-status > .support > .samsung::before { background-image: url(https://resources.whatwg.org/browser-logos/samsung.svg); }
            .caniuse-status > .caniuse { text-align: right; font-style: italic; }
            @media (max-width: 767px) {
                .caniuse-status.wrapped { width: 9em; height: auto; }
                .caniuse-status:not(.wrapped) { width: 1em; height: 1em; }
                .caniuse-status.wrapped > :not(input) { display: block; }
                .caniuse-status:not(.wrapped) > :not(input) { display: none; }
            }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-railroad */
svg.railroad-diagram{background-color:hsl(30,20%,95%);}svg.railroad-diagram path{stroke-width:3px;stroke:black;fill:rgba(0,0,0,0);}svg.railroad-diagram text{font:bold 14px monospace;text-anchor:middle;}svg.railroad-diagram text.label{text-anchor:start;}svg.railroad-diagram text.comment{font:italic 12px monospace;}svg.railroad-diagram rect{stroke-width:3px;stroke:black;fill:hsl(120,100%,90%);}</style>
<style>/* style-syntax-highlighting */

.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">Media Queries Level 4</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/mediaqueries-4/">https://drafts.csswg.org/mediaqueries-4/</a>
      <dt>Latest published version:
      <dd><a href="https://www.w3.org/TR/mediaqueries-4/">https://www.w3.org/TR/mediaqueries-4/</a>
      <dt>Previous Versions:
      <dd><a href="https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/" rel="prev">https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="43241"><a class="p-name fn u-url url" href="https://florian.rivoal.net">Florian Rivoal</a> (<span class="p-org org">Invited Expert</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="42199"><a class="p-name fn u-url url" href="http://xanthir.com/contact/">Tab Atkins Jr.</a> (<span class="p-org org">Google</span>)
      <dt class="editor">Former Editors:
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:howcome@opera.com">Håkon Wium Lie</a> (<span class="p-org org">Opera</span>)
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:tantek@cs.standard.edu">Tantek Çelik</a> (<span class="p-org org">Mozilla</span>)
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:daniel@glazman.org">Daniel Glazman</a> (<span class="p-org org">Disruptive Innovations</span>)
      <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:annevk@annevk.nl">Anne van Kesteren</a> (<span class="p-org org">Mozilla</span>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/mediaqueries-4/Overview.bs">GitHub Editor</a>
      <dt>Issue Tracking:
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/mediaqueries-4">GitHub Issues</a>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p><a data-link-type="dfn" href="#media-query" id="ref-for-media-query">Media Queries</a> allow authors to test and query values or features of the user agent or display device, independent of the document being rendered.  They are used in the CSS @media rule to conditionally apply styles to a document, and in various other contexts and languages, such as HTML and JavaScript.</p>
   <p>Media Queries Level 4 describes the mechanism and syntax of media queries, media types, and media features. It extends and supersedes the features defined in Media Queries Level 3.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “mediaqueries” in the title,
	preferably like this:
	“[mediaqueries] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
   <p>There is currently no preliminary interoperability or implementation report.</p>
  </div>
  <div data-fill-with="at-risk">
   <p>The following features are at-risk, and may be dropped during the CR period: </p>
   <ul>
    <li>the <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover">hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover">any-hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer">pointer</a>, and <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer">any-pointer</a> media features
   </ul>
   <p>“At-risk” is a W3C Process term-of-art, and does not necessarily imply that the feature is in danger of being dropped or delayed. It means that the WG believes the feature may have difficulty being interoperably implemented in a timely manner, and marking it as such allows the WG to drop the feature if necessary when transitioning to the Proposed Rec stage, without having to publish a new Candidate Rec without the feature first.</p>
  </div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li>
     <a href="#intro"><span class="secno">1</span> <span class="content"> Introduction</span></a>
     <ol class="toc">
      <li><a href="#placement"><span class="secno">1.1</span> <span class="content"> Module interactions</span></a>
      <li><a href="#values"><span class="secno">1.2</span> <span class="content"> Values</span></a>
      <li><a href="#units"><span class="secno">1.3</span> <span class="content"> Units</span></a>
     </ol>
    <li>
     <a href="#media"><span class="secno">2</span> <span class="content"> Media Queries</span></a>
     <ol class="toc">
      <li><a href="#mq-list"><span class="secno">2.1</span> <span class="content"> Combining Media Queries</span></a>
      <li>
       <a href="#mq-prefix"><span class="secno">2.2</span> <span class="content"> Media Query Modifiers</span></a>
       <ol class="toc">
        <li><a href="#mq-not"><span class="secno">2.2.1</span> <span class="content"> Negating a Media Query: the <span class="css">not</span> keyword</span></a>
        <li><a href="#mq-only"><span class="secno">2.2.2</span> <span class="content"> Hiding a Media Query From Legacy User Agents: the <span class="css">only</span> keyword</span></a>
       </ol>
      <li><a href="#media-types"><span class="secno">2.3</span> <span class="content"> Media Types</span></a>
      <li>
       <a href="#mq-features"><span class="secno">2.4</span> <span class="content"> Media Features</span></a>
       <ol class="toc">
        <li><a href="#mq-ranges"><span class="secno">2.4.1</span> <span class="content"> Media Feature Types: “range” and “discrete”</span></a>
        <li><a href="#mq-boolean-context"><span class="secno">2.4.2</span> <span class="content"> Evaluating Media Features in a Boolean Context</span></a>
        <li><a href="#mq-range-context"><span class="secno">2.4.3</span> <span class="content"> Evaluating Media Features in a Range Context</span></a>
        <li><a href="#mq-min-max"><span class="secno">2.4.4</span> <span class="content"> Using “min-” and “max-” Prefixes On Range Features</span></a>
       </ol>
      <li><a href="#media-conditions"><span class="secno">2.5</span> <span class="content">Combining Media Features</span></a>
     </ol>
    <li>
     <a href="#mq-syntax"><span class="secno">3</span> <span class="content"> Syntax</span></a>
     <ol class="toc">
      <li><a href="#evaluating"><span class="secno">3.1</span> <span class="content">Evaluating Media Queries</span></a>
      <li><a href="#error-handling"><span class="secno">3.2</span> <span class="content"> Error Handling</span></a>
     </ol>
    <li>
     <a href="#mf-dimensions"><span class="secno">4</span> <span class="content"> Viewport/Page Dimensions Media Features</span></a>
     <ol class="toc">
      <li><a href="#width"><span class="secno">4.1</span> <span class="content"> Width: the <span class="property">width</span> feature</span></a>
      <li><a href="#height"><span class="secno">4.2</span> <span class="content"> Height: the <span class="property">height</span> feature</span></a>
      <li><a href="#aspect-ratio"><span class="secno">4.3</span> <span class="content"> Aspect-Ratio: the <span class="property">aspect-ratio</span> feature</span></a>
      <li><a href="#orientation"><span class="secno">4.4</span> <span class="content"> Orientation: the <span class="property">orientation</span> feature</span></a>
     </ol>
    <li>
     <a href="#mf-display-quality"><span class="secno">5</span> <span class="content"> Display Quality Media Features</span></a>
     <ol class="toc">
      <li><a href="#resolution"><span class="secno">5.1</span> <span class="content"> Display Resolution: the <span class="property">resolution</span> feature</span></a>
      <li><a href="#scan"><span class="secno">5.2</span> <span class="content"> Display Type: the <span class="property">scan</span> feature</span></a>
      <li><a href="#grid"><span class="secno">5.3</span> <span class="content"> Detecting Console Displays: the <span class="property">grid</span> feature</span></a>
      <li><a href="#update"><span class="secno">5.4</span> <span class="content"> Display Update Frequency: the <span class="property">update</span> feature</span></a>
      <li><a href="#mf-overflow-block"><span class="secno">5.5</span> <span class="content"> Block-Axis Overflow: the <span class="property">overflow-block</span> feature</span></a>
      <li><a href="#mf-overflow-inline"><span class="secno">5.6</span> <span class="content"> Inline-Axis Overflow: the <span class="property">overflow-inline</span> feature</span></a>
     </ol>
    <li>
     <a href="#mf-colors"><span class="secno">6</span> <span class="content"> Color Media Features</span></a>
     <ol class="toc">
      <li><a href="#color"><span class="secno">6.1</span> <span class="content"> Color Depth: the <span class="property">color</span> feature</span></a>
      <li><a href="#color-index"><span class="secno">6.2</span> <span class="content"> Paletted Color Screens: the <span class="property">color-index</span> feature</span></a>
      <li><a href="#monochrome"><span class="secno">6.3</span> <span class="content"> Monochrome Screens: the <span class="property">monochrome</span> feature</span></a>
      <li><a href="#color-gamut"><span class="secno">6.4</span> <span class="content"> Color Display Quality: the <span class="property">color-gamut</span> feature</span></a>
     </ol>
    <li>
     <a href="#mf-interaction"><span class="secno">7</span> <span class="content"> Interaction Media Features</span></a>
     <ol class="toc">
      <li><a href="#pointer"><span class="secno">7.1</span> <span class="content"> Pointing Device Quality: the <span class="property">pointer</span> feature</span></a>
      <li><a href="#hover"><span class="secno">7.2</span> <span class="content"> Hover Capability: the <span class="property">hover</span> feature</span></a>
      <li><a href="#any-input"><span class="secno">7.3</span> <span class="content"> All Available Interaction Capabilities: the <span class="property">any-pointer</span> and <span class="property">any-hover</span> features</span></a>
     </ol>
    <li><a href="#mf-deprecated"><span class="secno">8</span> <span class="content"> Appendix A: Deprecated Media Features</span></a>
    <li>
     <a href="#changes"><span class="secno"></span> <span class="content"> Changes</span></a>
     <ol class="toc">
      <li><a href="#changes-2017-9"><span class="secno"></span> <span class="content"> Changes since the 5 Septemper 2017 Candidate Recommendation</span></a>
      <li><a href="#changes-2017"><span class="secno"></span> <span class="content"> Changes since the 19 May 2017 Working Draft</span></a>
      <li><a href="#changes-2012"><span class="secno"></span> <span class="content"> Changes Since Media Queries Level 3</span></a>
     </ol>
    <li><a href="#acknowledgments"><span class="secno"></span> <span class="content"> Acknowledgments</span></a>
    <li><a href="#priv-sec"><span class="secno">9</span> <span class="content">Privacy and Security Considerations</span></a>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li>
     <a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
     <ol class="toc">
      <li><a href="#media-descriptor-table"><span class="secno"></span> <span class="content"><span>@media</span> Descriptors</span></a>
     </ol>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content"> Introduction</span><a class="self-link" href="#intro"></a></h2>
   <p><em>This section is not normative.</em></p>
   <p>HTML4 <a data-link-type="biblio" href="#biblio-html401">[HTML401]</a> defined a mechanism to support media-dependent style sheets,
	tailored for different <a data-link-type="dfn" href="#media-type" id="ref-for-media-type">media types</a>.
	For example, a document may use different style sheets for screen and for print.
	In HTML, this can be written as:</p>
   <div class="example" id="example-f12a7f15">
    <a class="self-link" href="#example-f12a7f15"></a> 
<pre>&lt;link rel="stylesheet" type="text/css" media="screen" href="style.css">
&lt;link rel="stylesheet" type="text/css" media="print" href="print.css">
</pre>
   </div>
   <p>CSS adapted and extended this functionality with its <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media">@media</a> and <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-cascade-3/#at-ruledef-import" id="ref-for-at-ruledef-import">@import</a> rules,
	adding the ability to query the value of individual features:</p>
   <div class="example" id="example-23ee34e2">
    <a class="self-link" href="#example-23ee34e2"></a> Inside a CSS style sheet,
		one can declare that sections apply to certain <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①">media types</a>: 
<pre>@media screen {
  * { font-family: sans-serif }
}
</pre>
    <p>Similarly, stylesheets can be conditionally imported based on media queries:</p>
<pre>@import "print-styles.css" print;</pre>
   </div>
   <p><a data-link-type="dfn" href="#media-query" id="ref-for-media-query①">Media queries</a> can be used with HTML, XHTML, XML <a data-link-type="biblio" href="#biblio-xmlstyle">[XMLSTYLE]</a> and the @import and @media rules of CSS.</p>
   <div class="example" id="example-6b55b8a3">
    <a class="self-link" href="#example-6b55b8a3"></a> Here is the same example written in HTML, XHTML, XML, @import and @media: 
<pre>&lt;link media="screen and (color), projection and (color)"
      rel="stylesheet" href="example.css">

&lt;link media="screen and (color), projection and (color)"
      rel="stylesheet" href="example.css" />

&lt;?xml-stylesheet media="screen and (color), projection and (color)"
                 rel="stylesheet" href="example.css" ?>

@import url(example.css) screen and (color), projection and (color);

@media screen and (color), projection and (color) { … }
</pre>
    <p class="note" role="note"><span>Note:</span> The <a data-link-type="biblio" href="#biblio-xmlstyle">[XMLSTYLE]</a> specification has not yet been updated to
		use media queries in the <code>media</code> pseudo-attribute.</p>
   </div>
   <h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content"> Module interactions</span><a class="self-link" href="#placement"></a></h3>
   <p>This module replaces and extends the Media Queries, Media Type and Media Features
	defined in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> sections 7 and in <a data-link-type="biblio" href="#biblio-mediaq">[MEDIAQ]</a>.</p>
   <h3 class="heading settled" data-level="1.2" id="values"><span class="secno">1.2. </span><span class="content"> Values</span><a class="self-link" href="#values"></a></h3>
   <p>Value types not defined in this specification, such as <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value" id="ref-for-integer-value">&lt;integer></a>, <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value" id="ref-for-number-value">&lt;number></a> or <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a>, are defined in <a data-link-type="biblio" href="#biblio-css3val">[CSS3VAL]</a>.  Other CSS
	modules may expand the definitions of these value types.</p>
   <h3 class="heading settled" data-level="1.3" id="units"><span class="secno">1.3. </span><span class="content"> Units</span><a class="self-link" href="#units"></a></h3>
   <p>The units used in media queries are the same as in other parts of CSS, as
	defined in <a data-link-type="biblio" href="#biblio-css3val">[CSS3VAL]</a>. For example, the pixel unit represents CSS pixels and
	not physical pixels.</p>
   <p><a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#relative-length" id="ref-for-relative-length">Relative length</a> units in media queries are based on the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#initial-value" id="ref-for-initial-value">initial value</a>, which means
	that units are never based on results of declarations. <span class="note">For example, in HTML,
	the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#em" id="ref-for-em">em</a> unit is relative to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#initial-value" id="ref-for-initial-value①">initial value</a> of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size" id="ref-for-propdef-font-size">font-size</a>,
	defined by the user agent or the user’s preferences,
	not any styling on the page.</span></p>
   <h2 class="heading settled" data-level="2" id="media"><span class="secno">2. </span><span class="content"> Media Queries</span><a class="self-link" href="#media"></a></h2>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="media-query">media query</dfn> is a method of testing certain aspects of the user agent
	or device that the document is being displayed in. <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②">Media queries</a> are (almost) always independent of the contents of the document,
	its styling,
	or any other internal aspect;
	they’re only dependent on “external” information
	unless another feature explicitly specifies that it affects the resolution of Media Queries, <span class="non-normative">such as the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-device-adapt-1/#at-ruledef-viewport" id="ref-for-at-ruledef-viewport">@viewport</a> rule</span>.</p>
   <p>The syntax of a <a data-link-type="dfn" href="#media-query" id="ref-for-media-query③">media query</a> consists of
	an optional <a data-link-type="dfn" href="#media-query-modifier" id="ref-for-media-query-modifier">media query modifier</a>,
	an optional <a data-link-type="dfn" href="#media-type" id="ref-for-media-type②">media type</a>,
	and zero or more <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature">media features</a>:</p>
   <div class="railroad">
    <svg class="railroad-diagram" height="132" viewBox="0 0 576 132" width="576">
     <g transform="translate(.5 .5)">
      <path d="M 20 21 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
      <g>
       <path d="M40 31h0"></path>
       <path d="M536 31h0"></path>
       <path d="M40 31h20"></path>
       <g class="non-terminal">
        <path d="M60 31h158"></path>
        <path d="M358 31h158"></path>
        <rect height="22" width="140" x="218" y="20"></rect>
        <text x="288" y="35">media condition</text>
       </g>
       <path d="M516 31h20"></path>
       <path d="M40 31a10 10 0 0 1 10 10v30a10 10 0 0 0 10 10"></path>
       <g>
        <path d="M60 81h0"></path>
        <path d="M516 81h0"></path>
        <g>
         <path d="M60 81h0"></path>
         <path d="M152 81h0"></path>
         <path d="M60 81a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10"></path>
         <g class="terminal">
          <path d="M80 61h0"></path>
          <path d="M132 61h0"></path>
          <rect height="22" rx="10" ry="10" width="52" x="80" y="50"></rect>
          <text x="106" y="65">only</text>
         </g>
         <path d="M132 61a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10"></path>
         <path d="M60 81h20"></path>
         <g>
          <path d="M80 81h52"></path>
         </g>
         <path d="M132 81h20"></path>
         <path d="M60 81a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10"></path>
         <g class="terminal">
          <path d="M80 101h4"></path>
          <path d="M128 101h4"></path>
          <rect height="22" rx="10" ry="10" width="44" x="84" y="90"></rect>
          <text x="106" y="105">not</text>
         </g>
         <path d="M132 101a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10"></path>
        </g>
        <path d="M152 81h10"></path>
        <g class="non-terminal">
         <path d="M162 81h0"></path>
         <path d="M262 81h0"></path>
         <rect height="22" width="100" x="162" y="70"></rect>
         <text x="212" y="85">media type</text>
        </g>
        <path d="M262 81h10"></path>
        <g>
         <path d="M272 81h0"></path>
         <path d="M516 81h0"></path>
         <path d="M272 81a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10"></path>
         <g>
          <path d="M292 61h204"></path>
         </g>
         <path d="M496 61a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10"></path>
         <path d="M272 81h20"></path>
         <g>
          <path d="M292 81h0"></path>
          <path d="M496 81h0"></path>
          <g class="terminal">
           <path d="M292 81h0"></path>
           <path d="M336 81h0"></path>
           <rect height="22" rx="10" ry="10" width="44" x="292" y="70"></rect>
           <text x="314" y="85">and</text>
          </g>
          <path d="M336 81h10"></path>
          <path d="M346 81h10"></path>
          <g class="non-terminal">
           <path d="M356 81h0"></path>
           <path d="M496 81h0"></path>
           <rect height="22" width="140" x="356" y="70"></rect>
           <text x="426" y="85">media condition</text>
          </g>
         </g>
         <path d="M496 81h20"></path>
        </g>
       </g>
       <path d="M516 81a10 10 0 0 0 10 -10v-30a10 10 0 0 1 10 -10"></path>
      </g>
      <path d="M 536 31 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
     </g>
    </svg>
   </div>
   <p>A <a data-link-type="dfn" href="#media-query" id="ref-for-media-query④">media query</a> is a logical expression that is either true or false.
	A media query is true if:</p>
   <ul>
    <li data-md>
     <p>the <a data-link-type="dfn" href="#media-type" id="ref-for-media-type③">media type</a>,
if specified,
matches the media type of the device where the user agent is running, and</p>
    <li data-md>
     <p>the <a data-link-type="dfn" href="#media-condition" id="ref-for-media-condition">media condition</a> is true.</p>
   </ul>
   <p>Statements regarding media queries in this section assume the <a href="#mq-syntax">syntax section</a> is followed.
	Media queries that do not conform to the syntax are discussed in <a href="#error-handling">§ 3.2 Error Handling</a>.
	I.e. the syntax takes precedence over requirements in this section.</p>
   <div class="example" id="example-724d1b7b">
    <a class="self-link" href="#example-724d1b7b"></a> Here is a simple example written in HTML: 
<pre>&lt;link rel="stylesheet" media="screen and (color)" href="example.css" /></pre>
    <p>This example expresses that a certain style sheet
		(<code>example.css</code>) applies to devices of a certain media type
		(<a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen">screen</a>) with certain feature (it must be a color screen).</p>
    <p>Here is the same media query written in an @import-rule in CSS:</p>
<pre>@import url(example.css) screen and (color);</pre>
   </div>
   <p>User agents must re-evaluate <a data-link-type="dfn" href="#media-query" id="ref-for-media-query⑤">media queries</a> in response to changes in the user environment that they’re aware of,
	for example if the device is tiled from landscape to portrait orientation,
	and change the behavior of any constructs dependent on those <span id="ref-for-media-query⑥">media queries</span> accordingly.</p>
   <p>Unless another feature explicitly specifies that it affects the resolution of Media Queries, it is never necessary to apply a style sheet in order to evaluate expressions.</p>
   <p class="note" role="note"><span>Note:</span> CSS Device Adaptation <a data-link-type="biblio" href="#biblio-css-device-adapt">[CSS-DEVICE-ADAPT]</a> defines how <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-device-adapt-1/#at-ruledef-viewport" id="ref-for-at-ruledef-viewport①">@viewport</a> rules interact with Media Queries.</p>
   <h3 class="heading settled" data-level="2.1" id="mq-list"><span class="secno">2.1. </span><span class="content"> Combining Media Queries</span><a class="self-link" href="#mq-list"></a></h3>
   <p>Several <a data-link-type="dfn" href="#media-query" id="ref-for-media-query⑦">media queries</a> can be combined into a comma-separated <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="media-query-list">media query list</dfn>.</p>
   <div class="railroad">
    <svg class="railroad-diagram" height="101" viewBox="0 0 248 101" width="248">
     <g transform="translate(.5 .5)">
      <path d="M 20 30 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
      <g>
       <path d="M40 40h0"></path>
       <path d="M208 40h0"></path>
       <path d="M40 40a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10"></path>
       <g>
        <path d="M60 20h128"></path>
       </g>
       <path d="M188 20a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10"></path>
       <path d="M40 40h20"></path>
       <g>
        <path d="M60 40h0"></path>
        <path d="M188 40h0"></path>
        <path d="M60 40h10"></path>
        <g class="non-terminal">
         <path d="M70 40h0"></path>
         <path d="M178 40h0"></path>
         <rect height="22" width="108" x="70" y="29"></rect>
         <text x="124" y="44">media query</text>
        </g>
        <path d="M178 40h10"></path>
        <path d="M70 40a10 10 0 0 0 -10 10v10a10 10 0 0 0 10 10"></path>
        <g class="terminal">
         <path d="M70 70h40"></path>
         <path d="M138 70h40"></path>
         <rect height="22" rx="10" ry="10" width="28" x="110" y="59"></rect>
         <text x="124" y="74">,</text>
        </g>
        <path d="M178 70a10 10 0 0 0 10 -10v-10a10 10 0 0 0 -10 -10"></path>
       </g>
       <path d="M188 40h20"></path>
      </g>
      <path d="M 208 40 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
     </g>
    </svg>
   </div>
   <p>A <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list">media query list</a> is true if <em>any</em> of its component <a data-link-type="dfn" href="#media-query" id="ref-for-media-query⑧">media queries</a> are true,
	and false only if <em>all</em> of its component <span id="ref-for-media-query⑨">media queries</span> are false.</p>
   <div class="example" id="example-75a76747">
    <a class="self-link" href="#example-75a76747"></a> For example, the following <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list①">media query list</a> is true if either
		the <a data-link-type="dfn" href="#media-type" id="ref-for-media-type④">media type</a> is <a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen①">screen</a> and it’s a color device, <strong>or</strong> the <span id="ref-for-media-type⑤">media type</span> is <a class="css" data-link-type="maybe" href="#valdef-media-projection" id="ref-for-valdef-media-projection">projection</a> and it’s a color device: 
<pre>@media screen and (color), projection and (color) { … }
</pre>
   </div>
   <p>An empty <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list②">media query list</a> evaluates to true.</p>
   <div class="example" id="example-6f06ee45">
    <a class="self-link" href="#example-6f06ee45"></a> For example, these are equivalent: 
<pre>@media all { … }
@media { … }
</pre>
   </div>
   <h3 class="heading settled" data-level="2.2" id="mq-prefix"><span class="secno">2.2. </span><span class="content"> Media Query Modifiers</span><a class="self-link" href="#mq-prefix"></a></h3>
   <p>A <a data-link-type="dfn" href="#media-query" id="ref-for-media-query①⓪">media query</a> may optionally be prefixed by a single <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="media-query-modifier">media query modifier</dfn>,
	which is a single keyword which alters the meaning of the following <span id="ref-for-media-query①①">media query</span>.</p>
   <h4 class="heading settled" data-level="2.2.1" id="mq-not"><span class="secno">2.2.1. </span><span class="content"> Negating a Media Query: the <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not">not</a> keyword</span><a class="self-link" href="#mq-not"></a></h4>
   <p>An individual <a data-link-type="dfn" href="#media-query" id="ref-for-media-query①②">media query</a> can have its result negated
	by prefixing it with the keyword <dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-not">not</dfn>.
	If the <span id="ref-for-media-query①③">media query</span> would normally evaluate to true,
	prefixing it with <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not①">not</a> makes it evaluate to false,
	and vice versa.</p>
   <div class="example" id="example-b5a260cd">
    <a class="self-link" href="#example-b5a260cd"></a> For example, the following will apply to everything except color-capable screens.
		Note that the entire media query is negated,
		not just the <a data-link-type="dfn" href="#media-type" id="ref-for-media-type⑥">media type</a>. 
<pre>&lt;link rel="stylesheet" media="not screen and (color)" href="example.css" /></pre>
   </div>
   <h4 class="heading settled" data-level="2.2.2" id="mq-only"><span class="secno">2.2.2. </span><span class="content"> Hiding a Media Query From Legacy User Agents: the <a class="css" data-link-type="maybe" href="#valdef-media-only" id="ref-for-valdef-media-only">only</a> keyword</span><a class="self-link" href="#mq-only"></a></h4>
   <p>The concept of <a data-link-type="dfn" href="#media-query" id="ref-for-media-query①④">media queries</a> originates from HTML4 <a data-link-type="biblio" href="#biblio-html401">[HTML401]</a>.
	That specification only defined <a data-link-type="dfn" href="#media-type" id="ref-for-media-type⑦">media types</a>,
	but had a forward-compatible syntax that accommodated the addition of future concepts like <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①">media features</a>:
	it would consume the characters of a <span id="ref-for-media-query①⑤">media query</span> up to the first non-alphanumeric character,
	and interpret that as a <span id="ref-for-media-type⑧">media type</span>,
	ignoring the rest.
	For example, the <span id="ref-for-media-query①⑥">media query</span> <span class="css">screen and (color)</span> would be truncated to just <a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen②">screen</a>.</p>
   <p>Unfortunately, this means that legacy user agents using this error-handling behavior
	will ignore any <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②">media features</a> in a <a data-link-type="dfn" href="#media-query" id="ref-for-media-query①⑦">media query</a>,
	even if they’re far more important than the <a data-link-type="dfn" href="#media-type" id="ref-for-media-type⑨">media type</a> in the query.
	This can result in styles accidentally being applied in inappropriate situations.</p>
   <p>To hide these <a data-link-type="dfn" href="#media-query" id="ref-for-media-query①⑧">media queries</a> from legacy user agents,
	the <span id="ref-for-media-query①⑨">media query</span> can be prefixed with the keyword <dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-only">only</dfn>.
	The <a class="css" data-link-type="maybe" href="#valdef-media-only" id="ref-for-valdef-media-only①">only</a> keyword <strong>has no effect</strong> on the <span id="ref-for-media-query②⓪">media query</span>’s result,
	but will cause the <span id="ref-for-media-query②①">media query</span> to be parsed by legacy user agents
	as specifying the unknown <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①⓪">media type</a> “only”,
	and thus be ignored.</p>
   <div class="example" id="example-88774f15">
    <a class="self-link" href="#example-88774f15"></a> In this example, the stylesheet specified by the <code>&lt;link></code> element
		will not be used by legacy user agents,
		even if they would normally match the <a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen③">screen</a> <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①①">media type</a>. 
<pre>&lt;link rel="stylesheet" media="only screen and (color)" href="example.css" /></pre>
   </div>
   <p class="note" role="note"><span>Note:</span> Note that the <a class="css" data-link-type="maybe" href="#valdef-media-only" id="ref-for-valdef-media-only②">only</a> keyword can only be used before a <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①②">media type</a>.
	A <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②②">media query</a> consisting only of <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③">media features</a>,
	or one with another <a data-link-type="dfn" href="#media-query-modifier" id="ref-for-media-query-modifier①">media query modifier</a> like <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not②">not</a>,
	will be treated as false by legacy user agents automatically.</p>
   <p class="note" role="note"><span>Note:</span> At the time of publishing this specification,
	such legacy user agents are extremely rare,
	and so using the <a class="css" data-link-type="maybe" href="#valdef-media-only" id="ref-for-valdef-media-only③">only</a> modifier is rarely, if ever, necessary.</p>
   <h3 class="heading settled" data-level="2.3" id="media-types"><span class="secno">2.3. </span><span class="content"> Media Types</span><a class="self-link" href="#media-types"></a></h3>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="media-type">media type</dfn> is a broad category of user-agent devices
	on which a document may be displayed.
	The original set of <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①③">media types</a> were defined in HTML4,
	for the <code>media</code> attribute on <code>&lt;link></code> elements.</p>
   <p>Unfortunately, <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①④">media types</a> have proven insufficient as a way of discriminating between devices with different styling needs.
	Some categories which were originally quite distinct,
	such as <a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen④">screen</a> and <a class="css" data-link-type="maybe" href="#valdef-media-handheld" id="ref-for-valdef-media-handheld">handheld</a>,
	have blended significantly in the years since their invention.
	Others, such as <a class="css" data-link-type="maybe" href="#valdef-media-tty" id="ref-for-valdef-media-tty">tty</a> or <a class="css" data-link-type="maybe" href="#valdef-media-tv" id="ref-for-valdef-media-tv">tv</a>,
	expose useful differences from the norm of a full-featured computer monitor,
	and so are potentially useful to target with different styling,
	but the definition of <span id="ref-for-media-type①⑤">media types</span> as mutually exclusive
	makes it difficult to use them in a reasonable manner;
	instead, their exclusive aspects are better expressed as <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature④">media features</a> such as <a class="property" data-link-type="propdesc" href="#descdef-media-grid" id="ref-for-descdef-media-grid">grid</a> or <a class="property" data-link-type="propdesc" href="#descdef-media-scan" id="ref-for-descdef-media-scan">scan</a>.</p>
   <p>As such, the following <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①⑥">media types</a> are defined for use in <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②③">media queries</a>:</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-all">all</dfn> 
    <dd>Matches all devices. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-print">print</dfn> 
    <dd>Matches printers, and devices intended to reproduce a printed display,
			such as a web browser showing a document in “Print Preview”. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-screen">screen</dfn> 
    <dd>Matches all devices that aren’t matched by <a class="css" data-link-type="maybe" href="#valdef-media-print" id="ref-for-valdef-media-print">print</a> or <a class="css" data-link-type="maybe" href="#valdef-media-speech" id="ref-for-valdef-media-speech">speech</a>. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-speech">speech</dfn> 
    <dd>
     Matches devices that similar devices that “read out” a page. 
     <div class="note" role="note">Screen readers that produce a speech rendering based
		on the the visual layout of the page are expected to match <a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen⑤">screen</a> instead.
		This media type is for user agents that produce
		an audio rendition of the document, without any reference to a 2D visual layout. </div>
     <p class="issue" id="issue-5c3f70fa"><a class="self-link" href="#issue-5c3f70fa"></a> Is there any such UA, and if so do they match this media type?
		If not, it should be deprecated. <a href="https://github.com/w3c/csswg-drafts/issues/1751">&lt;https://github.com/w3c/csswg-drafts/issues/1751></a></p>
   </dl>
   <p>In addition, the following <strong>deprecated</strong> <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①⑦">media types</a> are defined.
	Authors must not use these <span id="ref-for-media-type①⑧">media types</span>;
	instead, it is recommended that they select appropriate <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature⑤">media features</a> that better represent the aspect of the device that they are attempting to style against.</p>
   <p>User agents must recognize the following <a data-link-type="dfn" href="#media-type" id="ref-for-media-type①⑨">media types</a> as valid,
	but must make them match nothing.</p>
   <ul>
    <li><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-tty">tty</dfn> 
    <li><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-tv">tv</dfn> 
    <li><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-projection">projection</dfn> 
    <li><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-handheld">handheld</dfn> 
    <li><dfn class="css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-braille">braille<a class="self-link" href="#valdef-media-braille"></a></dfn> 
    <li><dfn class="css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-embossed">embossed<a class="self-link" href="#valdef-media-embossed"></a></dfn> 
    <li><dfn class="css" data-dfn-for="@media" data-dfn-type="value" data-export id="valdef-media-aural">aural<a class="self-link" href="#valdef-media-aural"></a></dfn> 
   </ul>
   <p class="note" role="note"><span>Note:</span> It is expected that all of the media types will also be deprecated in time,
	as appropriate <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature⑥">media features</a> are defined which capture their important differences.</p>
   <h3 class="heading settled" data-level="2.4" id="mq-features"><span class="secno">2.4. </span><span class="content"> Media Features</span><a class="self-link" href="#mq-features"></a></h3>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="media-feature">media feature</dfn> is a more fine-grained test than <a data-link-type="dfn" href="#media-type" id="ref-for-media-type②⓪">media types</a>,
	testing a single, specific feature of the user agent or display device.</p>
   <p>Syntactically, <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature⑦">media features</a> resemble CSS properties:
	they consist of a feature name, a colon, and a value to test for.
	They may also be written in boolean form as just a feature name,
	or in range form with a comparison operator.</p>
   <div class="railroad">
    <svg class="railroad-diagram" height="122" viewBox="0 0 524 122" width="524">
     <g transform="translate(.5 .5)">
      <path d="M 20 21 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
      <path d="M40 31h10"></path>
      <g class="terminal">
       <path d="M50 31h0"></path>
       <path d="M78 31h0"></path>
       <rect height="22" rx="10" ry="10" width="28" x="50" y="20"></rect>
       <text x="64" y="35">(</text>
      </g>
      <path d="M78 31h10"></path>
      <g>
       <path d="M88 31h0"></path>
       <path d="M436 31h0"></path>
       <path d="M88 31h20"></path>
       <g>
        <path d="M108 31h0"></path>
        <path d="M416 31h0"></path>
        <g class="non-terminal">
         <path d="M108 31h0"></path>
         <path d="M224 31h0"></path>
         <rect height="22" width="116" x="108" y="20"></rect>
         <text x="166" y="35">feature name</text>
        </g>
        <path d="M224 31h10"></path>
        <path d="M234 31h10"></path>
        <g class="terminal">
         <path d="M244 31h0"></path>
         <path d="M272 31h0"></path>
         <rect height="22" rx="10" ry="10" width="28" x="244" y="20"></rect>
         <text x="258" y="35">:</text>
        </g>
        <path d="M272 31h10"></path>
        <path d="M282 31h10"></path>
        <g class="non-terminal">
         <path d="M292 31h0"></path>
         <path d="M416 31h0"></path>
         <rect height="22" width="124" x="292" y="20"></rect>
         <text x="354" y="35">feature value</text>
        </g>
       </g>
       <path d="M416 31h20"></path>
       <path d="M88 31a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
       <g class="non-terminal">
        <path d="M108 61h96"></path>
        <path d="M320 61h96"></path>
        <rect height="22" width="116" x="204" y="50"></rect>
        <text x="262" y="65">feature name</text>
       </g>
       <path d="M416 61a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
       <path d="M88 31a10 10 0 0 1 10 10v40a10 10 0 0 0 10 10"></path>
       <g>
        <path d="M108 91h50"></path>
        <path d="M365 91h50"></path>
        <g class="non-terminal">
         <path d="M158 91h0"></path>
         <path d="M258 91h0"></path>
         <rect height="22" width="100" x="158" y="80"></rect>
         <text x="208" y="95">range form</text>
        </g>
        <path d="M258 91h10"></path>
        <path d="M268 91h10"></path>
        <g>
         <path d="M278 91h0"></path>
         <path d="M365 91h0"></path>
         <text class="comment" x="321" y="96">(see below)</text>
        </g>
       </g>
       <path d="M416 91a10 10 0 0 0 10 -10v-40a10 10 0 0 1 10 -10"></path>
      </g>
      <path d="M436 31h10"></path>
      <g class="terminal">
       <path d="M446 31h0"></path>
       <path d="M474 31h0"></path>
       <rect height="22" rx="10" ry="10" width="28" x="446" y="20"></rect>
       <text x="460" y="35">)</text>
      </g>
      <path d="M474 31h10"></path>
      <path d="M 484 31 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
     </g>
    </svg>
   </div>
   <p>There are, however, several important differences between properties and media features:</p>
   <ul>
    <li> Properties are used to give information about how to present a document.
			Media features are used to describe requirements of the output device. 
    <li> Media features are always wrapped in parentheses
			and combined with the <span class="css">and</span> or <span class="css">or</span> keywords,
			like <span class="css">(color) and (min-width: 600px)</span>,
			rather than being separated with semicolons. 
    <li> A media feature may be given with <em>only</em> its name
			(omitting the colon and value)
			to evaluate the feature in a <a data-link-type="dfn" href="#boolean-context" id="ref-for-boolean-context">boolean context</a>.
			This is a convenient shorthand for features that have a reasonable value representing 0 or “none”.
			For example, <span class="css">(color)</span> is true is the <a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color">color</a> <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature⑧">media feature</a> is non-zero. 
    <li> <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature⑨">Media features</a> with “range” type can be written in a <a data-link-type="dfn" href="#range-context" id="ref-for-range-context">range context</a>,
			which uses standard mathematical comparison operators rather than a colon,
			or have their feature names <a href="#mq-min-max">prefixed with “min-” or “max-”</a>. 
    <li> Properties sometimes accept complex values,
			e.g., calculations that involve several other values. <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①⓪">Media features</a> only accept single values: one keyword, one number, etc. 
   </ul>
   <p>If a <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①①">media feature</a> references a concept which does not exist on the device where the UA is running
	(for example, speech UAs do not have a concept of “width”),
	the <span id="ref-for-media-feature①②">media feature</span> must always evaluate to false.</p>
   <div class="example" id="example-b561f02b">
    <a class="self-link" href="#example-b561f02b"></a> The media feature <span class="css">device-aspect-ratio</span> only applies to
		visual devices. On an <a class="css" data-link-type="maybe" href="#valdef-media-speech" id="ref-for-valdef-media-speech①">speech</a> device, expressions involving <span class="css">device-aspect-ratio</span> will therefore always be false: 
<pre>&lt;link media="speech and (device-aspect-ratio: 16/9)"
      rel="stylesheet" href="example.css">
</pre>
   </div>
   <h4 class="heading settled" data-level="2.4.1" id="mq-ranges"><span class="secno">2.4.1. </span><span class="content"> Media Feature Types: “range” and “discrete”</span><a class="self-link" href="#mq-ranges"></a></h4>
   <p>Every media feature defines its “type” as either “range” or “discrete” in its definition table.</p>
   <p>“Discrete” media features,
	like <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①">pointer</a> take their values from a set.
	The values may be keywords
	or boolean numbers (0 and 1),
	but the common factor is that there’s no intrinsic “order” to them—<wbr>none of the values are “less than” or “greater than” each other.</p>
   <p>“Range” media features like <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width">width</a>, on the other hand,
	take their values from a range.
	Any two values can be compared to see which is lesser and which is greater.</p>
   <p>The only significant difference between the two types is that “range” <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①③">media features</a> can be evaluated in a <a data-link-type="dfn" href="#range-context" id="ref-for-range-context①">range context</a> and accept “min-” and “max-” prefixes on their name.
	Doing either of these changes the meaning of the feature—<wbr>rather than the <span id="ref-for-media-feature①④">media feature</span> being true when the feature exactly matches the given value,
	it matches when the feature is greater than/less than/equal to the given value.</p>
   <div class="example" id="example-772c034d">
    <a class="self-link" href="#example-772c034d"></a> A ''(width >= 600px)'' <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①⑤">media feature</a> is true
		when the viewport’s width is <span class="css">600px</span> <em>or more</em>. 
    <p>On the other hand, <span class="css">(width: 600px)</span> by itself is only true
		when the viewport’s width is <em>exactly</em> <span class="css">600px</span>.
		If it’s less or greater than <span class="css">600px</span>, it’ll be false.</p>
   </div>
   <h4 class="heading settled" data-level="2.4.2" id="mq-boolean-context"><span class="secno">2.4.2. </span><span class="content"> Evaluating Media Features in a Boolean Context</span><a class="self-link" href="#mq-boolean-context"></a></h4>
   <p>While <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①⑥">media features</a> normally have a syntax similar to CSS properties,
	they can also be written more simply as just the feature name,
	like <span class="css">(color)</span>.</p>
   <p>When written like this, the <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①⑦">media feature</a> is evaluated in a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="boolean-context">boolean context</dfn>.
	If the feature would be true for any value <em>other than</em> the number <span class="css">0</span>,
	a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-dimension" id="ref-for-typedef-dimension">&lt;dimension></a> with the value <span class="css">0</span>,
	or the keyword <a class="css" data-link-type="maybe" href="#valdef-media-update-none" id="ref-for-valdef-media-update-none">none</a>,
	the <span id="ref-for-media-feature①⑧">media feature</span> evaluates to true.
	Otherwise, it evaluates to false.</p>
   <div class="example" id="example-f4e46a51">
    <a class="self-link" href="#example-f4e46a51"></a> Some <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature①⑨">media features</a> are designed to be written like this. 
    <p>For example, <a class="property" data-link-type="propdesc" href="#descdef-media-update" id="ref-for-descdef-media-update">update</a> is typically written as <span class="css">(update)</span> to test if any kind of updating is available,
		or <span class="css">not (update)</span> to check for the opposite.</p>
    <p>It can still be given an explicit value as well,
		with <span class="css">(update: fast) or (update: slow)</span> equal to <span class="css">(update)</span>,
		and <span class="css">(update: none)</span> equal to <span class="css">not (update)</span>.</p>
   </div>
   <div class="example" id="example-b4366ae2"><a class="self-link" href="#example-b4366ae2"></a> Some numeric <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②⓪">media features</a>, like <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width①">width</a>,
		are rarely if ever useful to evaluate in a <a data-link-type="dfn" href="#boolean-context" id="ref-for-boolean-context①">boolean context</a>,
		as their values are almost always greater than zero.
		Others, like <a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color①">color</a>, have meaningful zero values: <span class="css">(color)</span> is identical to <span class="css">(color > 0)</span>,
		indicating that the device is capable of displaying color at all. </div>
   <div class="example" id="example-9591e2ed">
    <a class="self-link" href="#example-9591e2ed"></a> Only some of the <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②①">media features</a> that accept keywords are meaningful in a <a data-link-type="dfn" href="#boolean-context" id="ref-for-boolean-context②">boolean context</a>. 
    <p>For example, <span class="css">(pointer)</span> is useful,
		as <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer②">pointer</a> has a <a class="css" data-link-type="maybe" href="#valdef-media-pointer-none" id="ref-for-valdef-media-pointer-none">none</a> value to indicate there’s no pointing device at all on the device.
		On the other hand, <span class="css">(scan)</span> is just always true or always false
		(depending on whether it applies at all to the device),
		as there’s no value that means “false”.</p>
   </div>
   <h4 class="heading settled" data-level="2.4.3" id="mq-range-context"><span class="secno">2.4.3. </span><span class="content"> Evaluating Media Features in a Range Context</span><a class="self-link" href="#mq-range-context"></a></h4>
   <p><a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②②">Media features</a> with a “range” type can be alternately written in a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="range-context">range context</dfn> that takes advantage of the fact that their values are ordered,
	using ordinary mathematical comparison operators:</p>
   <div class="railroad">
    <svg class="railroad-diagram" height="302" viewBox="0 0 644 302" width="644">
     <g transform="translate(.5 .5)">
      <path d="M 20 141 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
      <path d="M40 151h10"></path>
      <g class="terminal">
       <path d="M50 151h0"></path>
       <path d="M78 151h0"></path>
       <rect height="22" rx="10" ry="10" width="28" x="50" y="140"></rect>
       <text x="64" y="155">(</text>
      </g>
      <path d="M78 151h10"></path>
      <g>
       <path d="M88 151h0"></path>
       <path d="M556 151h0"></path>
       <path d="M88 151h20"></path>
       <g>
        <path d="M108 151h2"></path>
        <path d="M534 151h2"></path>
        <g class="non-terminal">
         <path d="M110 151h0"></path>
         <path d="M274 151h0"></path>
         <rect height="22" width="164" x="110" y="140"></rect>
         <text x="192" y="155">feature name/value</text>
        </g>
        <path d="M274 151h10"></path>
        <g>
         <path d="M284 151h0"></path>
         <path d="M360 151h0"></path>
         <path d="M284 151a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
         <g class="terminal">
          <path d="M304 121h4"></path>
          <path d="M336 121h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="308" y="110"></rect>
          <text x="322" y="125">></text>
         </g>
         <path d="M340 121a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
         <path d="M284 151a10 10 0 0 0 10 -10v-40a10 10 0 0 1 10 -10"></path>
         <g class="terminal">
          <path d="M304 91h0"></path>
          <path d="M340 91h0"></path>
          <rect height="22" rx="10" ry="10" width="36" x="304" y="80"></rect>
          <text x="322" y="95">&lt;=</text>
         </g>
         <path d="M340 91a10 10 0 0 1 10 10v40a10 10 0 0 0 10 10"></path>
         <path d="M284 151a10 10 0 0 0 10 -10v-70a10 10 0 0 1 10 -10"></path>
         <g class="terminal">
          <path d="M304 61h4"></path>
          <path d="M336 61h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="308" y="50"></rect>
          <text x="322" y="65">&lt;</text>
         </g>
         <path d="M340 61a10 10 0 0 1 10 10v70a10 10 0 0 0 10 10"></path>
         <path d="M284 151a10 10 0 0 0 10 -10v-100a10 10 0 0 1 10 -10"></path>
         <g class="terminal">
          <path d="M304 31h4"></path>
          <path d="M336 31h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="308" y="20"></rect>
          <text x="322" y="35">=</text>
         </g>
         <path d="M340 31a10 10 0 0 1 10 10v100a10 10 0 0 0 10 10"></path>
         <path d="M284 151h20"></path>
         <g class="terminal">
          <path d="M304 151h0"></path>
          <path d="M340 151h0"></path>
          <rect height="22" rx="10" ry="10" width="36" x="304" y="140"></rect>
          <text x="322" y="155">>=</text>
         </g>
         <path d="M340 151h20"></path>
        </g>
        <path d="M360 151h10"></path>
        <g class="non-terminal">
         <path d="M370 151h0"></path>
         <path d="M534 151h0"></path>
         <rect height="22" width="164" x="370" y="140"></rect>
         <text x="452" y="155">feature value/name</text>
        </g>
       </g>
       <path d="M536 151h20"></path>
       <path d="M88 151a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
       <g>
        <path d="M108 181h0"></path>
        <path d="M536 181h0"></path>
        <g class="non-terminal">
         <path d="M108 181h0"></path>
         <path d="M168 181h0"></path>
         <rect height="22" width="60" x="108" y="170"></rect>
         <text x="138" y="185">value</text>
        </g>
        <path d="M168 181h10"></path>
        <g>
         <path d="M178 181h0"></path>
         <path d="M254 181h0"></path>
         <path d="M178 181h20"></path>
         <g class="terminal">
          <path d="M198 181h4"></path>
          <path d="M230 181h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="202" y="170"></rect>
          <text x="216" y="185">&lt;</text>
         </g>
         <path d="M234 181h20"></path>
         <path d="M178 181a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
         <g class="terminal">
          <path d="M198 211h0"></path>
          <path d="M234 211h0"></path>
          <rect height="22" rx="10" ry="10" width="36" x="198" y="200"></rect>
          <text x="216" y="215">&lt;=</text>
         </g>
         <path d="M234 211a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
        </g>
        <path d="M254 181h10"></path>
        <g class="non-terminal">
         <path d="M264 181h0"></path>
         <path d="M380 181h0"></path>
         <rect height="22" width="116" x="264" y="170"></rect>
         <text x="322" y="185">feature name</text>
        </g>
        <path d="M380 181h10"></path>
        <g>
         <path d="M390 181h0"></path>
         <path d="M466 181h0"></path>
         <path d="M390 181h20"></path>
         <g class="terminal">
          <path d="M410 181h4"></path>
          <path d="M442 181h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="414" y="170"></rect>
          <text x="428" y="185">&lt;</text>
         </g>
         <path d="M446 181h20"></path>
         <path d="M390 181a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
         <g class="terminal">
          <path d="M410 211h0"></path>
          <path d="M446 211h0"></path>
          <rect height="22" rx="10" ry="10" width="36" x="410" y="200"></rect>
          <text x="428" y="215">&lt;=</text>
         </g>
         <path d="M446 211a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
        </g>
        <path d="M466 181h10"></path>
        <g class="non-terminal">
         <path d="M476 181h0"></path>
         <path d="M536 181h0"></path>
         <rect height="22" width="60" x="476" y="170"></rect>
         <text x="506" y="185">value</text>
        </g>
       </g>
       <path d="M536 181a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
       <path d="M88 151a10 10 0 0 1 10 10v70a10 10 0 0 0 10 10"></path>
       <g>
        <path d="M108 241h0"></path>
        <path d="M536 241h0"></path>
        <g class="non-terminal">
         <path d="M108 241h0"></path>
         <path d="M168 241h0"></path>
         <rect height="22" width="60" x="108" y="230"></rect>
         <text x="138" y="245">value</text>
        </g>
        <path d="M168 241h10"></path>
        <g>
         <path d="M178 241h0"></path>
         <path d="M254 241h0"></path>
         <path d="M178 241h20"></path>
         <g class="terminal">
          <path d="M198 241h4"></path>
          <path d="M230 241h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="202" y="230"></rect>
          <text x="216" y="245">></text>
         </g>
         <path d="M234 241h20"></path>
         <path d="M178 241a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
         <g class="terminal">
          <path d="M198 271h0"></path>
          <path d="M234 271h0"></path>
          <rect height="22" rx="10" ry="10" width="36" x="198" y="260"></rect>
          <text x="216" y="275">>=</text>
         </g>
         <path d="M234 271a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
        </g>
        <path d="M254 241h10"></path>
        <g class="non-terminal">
         <path d="M264 241h0"></path>
         <path d="M380 241h0"></path>
         <rect height="22" width="116" x="264" y="230"></rect>
         <text x="322" y="245">feature name</text>
        </g>
        <path d="M380 241h10"></path>
        <g>
         <path d="M390 241h0"></path>
         <path d="M466 241h0"></path>
         <path d="M390 241h20"></path>
         <g class="terminal">
          <path d="M410 241h4"></path>
          <path d="M442 241h4"></path>
          <rect height="22" rx="10" ry="10" width="28" x="414" y="230"></rect>
          <text x="428" y="245">></text>
         </g>
         <path d="M446 241h20"></path>
         <path d="M390 241a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
         <g class="terminal">
          <path d="M410 271h0"></path>
          <path d="M446 271h0"></path>
          <rect height="22" rx="10" ry="10" width="36" x="410" y="260"></rect>
          <text x="428" y="275">>=</text>
         </g>
         <path d="M446 271a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
        </g>
        <path d="M466 241h10"></path>
        <g class="non-terminal">
         <path d="M476 241h0"></path>
         <path d="M536 241h0"></path>
         <rect height="22" width="60" x="476" y="230"></rect>
         <text x="506" y="245">value</text>
        </g>
       </g>
       <path d="M536 241a10 10 0 0 0 10 -10v-70a10 10 0 0 1 10 -10"></path>
      </g>
      <path d="M556 151h10"></path>
      <g class="terminal">
       <path d="M566 151h0"></path>
       <path d="M594 151h0"></path>
       <rect height="22" rx="10" ry="10" width="28" x="566" y="140"></rect>
       <text x="580" y="155">)</text>
      </g>
      <path d="M594 151h10"></path>
      <path d="M 604 151 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
     </g>
    </svg>
   </div>
   <p class="note" role="note"><span>Note:</span> This syntax is new to Level 4 of Mediaqueries,
	and thus is not as widely supported at the moment
	as the <span class="css">min-</span>/<span class="css">max-</span> prefixes.</p>
   <p>The basic form,
	consisting of a feature name,
	a comparison operator,
	and a value,
	returns true if the relationship is true.</p>
   <div class="example" id="example-fc928617"><a class="self-link" href="#example-fc928617"></a> For example, <span class="css">(height > 600px)</span> (or <span class="css">(600px &lt; height)</span>)
		returns true if the viewport height is greater than <span class="css">600px</span>. </div>
   <p>The remaining forms,
	with the feature name nested between two value comparisons,
	returns true if both comparisons are true.</p>
   <div class="example" id="example-ef30a3ee"><a class="self-link" href="#example-ef30a3ee"></a> For example, <span class="css">(400px &lt; width &lt; 1000px)</span> returns true if the viewport width is between <span class="css">400px</span> and <span class="css">1000px</span> (but not equal to either). </div>
   <p>Some media features with a "range" type are said to be <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="false-in-the-negative-range">false in the negative range</dfn>.
	This means that negative values are valid and must be parsed, and that
	querying whether the media feature is equal to, less than, or less or equal than
	any such negative value must evaluate to false.
	Querying whether the media feature is greater, or greater or equal, than a negative
	value evaluates to true if the relationship is true.</p>
   <p class="note" role="note"><span>Note:</span> If negative values had been rejected at parse time instead,
	they would be treated as <span class="css">unknown</span> based on the error handling rules.
	However, in reality,
	whether a device’s <a class="property" data-link-type="propdesc" href="#descdef-media-resolution" id="ref-for-descdef-media-resolution">resolution</a> is <span class="css">-300dpi</span> is not unknown, it is known to be false.
	Similarly, for any visual device, the <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width②">width</a> of the targeted display area is known to be greater than <span class="css">-200px</span> The above rule reflects that,
	making intuition match what UAs do.</p>
   <div class="example" id="example-d3333f79">
    <a class="self-link" href="#example-d3333f79"></a> The following examples result in a green background on all visual devices: 
<pre><code class="lang-css highlight"><c- n>@media</c-> not <c- p>(</c->width <c- f>&lt;= -100px) </c-><c- p>{</c->
  body { background: green; }
}
</code></pre>
<pre><code class="lang-css highlight"><c- n>@media</c-> <c- p>(</c->height <c- f>> -100px) </c-><c- p>{</c->
  body { background: green; }
}
</code></pre>
<pre><code class="lang-css highlight"><c- n>@media</c-> not <c- p>(</c->resolution<c- f>: -300dpi) </c-><c- p>{</c->
  body { background: green; }
}
</code></pre>
   </div>
   <div class="advisement"> This is a behavior change compared to Media Queries Level 3 <a data-link-type="biblio" href="#biblio-mediaq">[MEDIAQ]</a>,
	where negative values on these properties caused a syntax error.
	In level 3, syntax errors—including forbidden values—resulted in the entire <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②④">media query</a> being false,
	rather than the <span class="css">unknown</span> treatment defined in this level.
	Implementations updating from level 3 should make sure
	to change the handling of negative values for the relevant properties
	when they add support for the richer syntax defined in <a href="#media-conditions">§ 2.5 Combining Media Features</a>,
	to avoid introducing unintended semantics. </div>
   <h4 class="heading settled" data-level="2.4.4" id="mq-min-max"><span class="secno">2.4.4. </span><span class="content"> Using “min-” and “max-” Prefixes On Range Features</span><a class="self-link" href="#mq-min-max"></a></h4>
   <p>Rather than evaluating a “range” type <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②③">media feature</a> in a range context,
	as described above,
	the feature may be written as a normal <span id="ref-for-media-feature②④">media feature</span>,
	but with a “min-” or “max-” prefix on the feature name.</p>
   <p>This is equivalent to evaluating the feature in a <a data-link-type="dfn" href="#range-context" id="ref-for-range-context②">range context</a>,
	as follows:</p>
   <ul>
    <li> Using a “min-” prefix on a feature name is equivalent to using the “>=” operator.
			For example, <span class="css">(min-height: 600px)</span> is equivalent to ''(height >= 600px)''. 
    <li> Using a “max-” prefix on a feature name is equivalent to using the “&lt;=” operator.
			For example, <span class="css">(max-width: 40em)</span> is equivalent to ''(width &lt;= 40em)''. 
   </ul>
   <p class="note" role="note"><span>Note:</span> because “min-” and “max-” both equate to range comparisons that <strong>include</strong> the value,
	they may be limiting in certain situations.</p>
   <div class="example" id="example-e45f87c2">
    <a class="self-link" href="#example-e45f87c2"></a> For instance,
		authors trying to define different styles based on a breakpoint in the viewport width using “min-” and “max-”
		would generally offset the values they’re comparing,
		to ensure that both queries don’t evaluate to true simultaneously.
		Assuming the breakpoint is at 320px, authors would conceptually use: 
<pre>@media (max-width: 320px) { /* styles for viewports &lt;= 320px */ }
@media (min-width: 321px) { /* styles for viewports >= 321px */ }
</pre>
    <p>While this ensures that the two sets of styles don’t apply simultaneously when the viewport width is 320px,
		it does not take into account the possibility of fractional viewport sizes which can occur as a result of non-integer pixel densities
		(e.g. on high-dpi displays or as a result of zooming/scaling).
		Any viewport widths that fall between 320px and 321px will result in none of the styles being applied.</p>
    <p>One approach to work around this problem is to increase the precision of the values used for the comparison. Using the example above,
		changing the second comparison value to 320.01px significantly reduces the change that a viewport width on a device would fall
		between the cracks.</p>
<pre>@media (max-width: 320px) { /* styles for viewports &lt;= 320px */ }
@media (min-width: 320.01px) { /* styles for viewports >= 320.01px */ }
</pre>
    <p>However, in these situations, <a data-link-type="dfn" href="#range-context" id="ref-for-range-context③">range context</a> queries (which are not limited to “>=” and “&lt;=” comparisons) offer a more appropriate solution:</p>
<pre>@media (width &lt;= 320px) { /* styles for viewports &lt;= 320px */ }
@media (width > 320px) { /* styles for viewports > 320px */ }
</pre>
   </div>
   <p>“Discrete” type properties do not accept “min-” or “max-” prefixes.
	Adding such a prefix to a “discrete” type <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②⑤">media feature</a> simply results in an unknown feature name.</p>
   <div class="example" id="example-d539f038"><a class="self-link" href="#example-d539f038"></a> For example, <span class="css">(min-grid: 1)</span> is invalid,
		because <a class="property" data-link-type="propdesc" href="#descdef-media-grid" id="ref-for-descdef-media-grid①">grid</a> is a “discrete” <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②⑥">media feature</a>,
		and so doesn’t accept the prefixes.
		(Even though the <span class="property" id="ref-for-descdef-media-grid②">grid</span> <span id="ref-for-media-feature②⑦">media feature</span> appears to be numeric,
		as it accepts the values <span class="css">0</span> and <span class="css">1</span>.) </div>
   <p>Attempting to evaluate a min/max prefixed <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②⑧">media feature</a> in a <a data-link-type="dfn" href="#boolean-context" id="ref-for-boolean-context③">boolean context</a> is invalid and a syntax error.</p>
   <h3 class="heading settled" data-level="2.5" id="media-conditions"><span class="secno">2.5. </span><span class="content">Combining Media Features</span><a class="self-link" href="#media-conditions"></a></h3>
   <p>Multiple <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature②⑨">media features</a> can be combined together into a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="media-condition">media condition</dfn> using full boolean algebra
	(not, and, or).</p>
   <ul>
    <li data-md>
     <p>Any media feature can be negated by placing <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not③">not</a> before it.
For example, <span class="css">not (color)</span> inverts the meaning of <span class="css">(color)</span>—<wbr>since <span class="css">(color)</span> matches a device with any kind of color display, <span class="css">not (color)</span> matches a device <em>without</em> any kind of color display.</p>
    <li data-md>
     <p>Two or more media features can be chained together,
such that the query is only true if <em>all</em> of the media features are true,
by placing <span class="css">and</span> between them.
For example, <span class="css">(width &lt; 600px) and (height &lt; 600px)</span> only matches devices whose screens are smaller than <span class="css">600px</span> wide in both dimensions.</p>
    <li data-md>
     <p>Alternately, two or more media features can be chained together,
such that the query is true if <em>any</em> of the media features are true,
by placing <span class="css">or</span> between them.
For example, <span class="css">(update: slow) or (hover: none)</span> matches if the device is slow to update the screen (such as an e-reader) <em>or</em> the primary pointing device has no hover capability,
perhaps indicating that one should use a layout that displays more information
rather than compactly hiding it until the user hovers.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="#media-condition" id="ref-for-media-condition①">Media conditions</a> can be grouped by wrapping them in parentheses <span class="css">()</span> which can then be nested within a condition the same as a single media query.
For example, <span class="css">(not (color)) or (hover)</span> is true on devices that are monochrome
and/or that have hover capabilities.
If one instead wanted to query for a device that was monochrome and <em>didn’t</em> have hover capabilities,
it must instead be written as <span class="css">not ((color) or (hover))</span> (or, equivalently, as <span class="css">(not (color)) and (not (hover))</span>).</p>
   </ul>
   <p>It is <em>invalid</em> to mix <span class="css">and</span> and <span class="css">or</span> and <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not④">not</a> at the same “level” of a media query.
	For example, <span class="css">(color) and (pointer) or (hover)</span> is illegal,
	as it’s unclear what was meant.
	Instead, parentheses can be used to group things using a particular joining keyword,
	yielding either <span class="css">(color) and ((pointer) or (hover))</span> or <span class="css">((color) and (pointer)) or (hover)</span>.
	These two have very different meanings:
	if only <span class="css">(hover)</span> is true,
	the first one evaluates to false
	but the second evaluates to true.</p>
   <h2 class="heading settled" data-level="3" id="mq-syntax"><span class="secno">3. </span><span class="content"> Syntax</span><a class="self-link" href="#mq-syntax"></a></h2>
   <p>Informal descriptions of the media query syntax appear in the prose and railroad diagrams in previous sections.
	The formal media query syntax is described in this section,
	with the rule/property grammar syntax defined in <a data-link-type="biblio" href="#biblio-css3syn">[CSS3SYN]</a> and <a data-link-type="biblio" href="#biblio-css3val">[CSS3VAL]</a>.</p>
   <p>To parse a <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-media-query-list">&lt;media-query-list></dfn> production, <a data-link-type="dfn" href="https://drafts.csswg.org/css-syntax-3/#parse-a-comma-separated-list-of-component-values" id="ref-for-parse-a-comma-separated-list-of-component-values">parse a comma-separated list of component values</a>,
	then parse each entry in the returned list as a <a class="production css" data-link-type="type" href="#typedef-media-query" id="ref-for-typedef-media-query">&lt;media-query></a>.
	Its value is the list of <span class="production" id="ref-for-typedef-media-query①">&lt;media-query></span>s so produced.</p>
   <p class="note" role="note"><span>Note:</span> This explicit definition of <a class="production css" data-link-type="type" href="#typedef-media-query-list" id="ref-for-typedef-media-query-list">&lt;media-query-list></a> parsing
	is necessary to make the error-recovery behavior of <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list③">media query lists</a> well-defined.</p>
   <p class="note" role="note"><span>Note:</span> This definition of <a class="production css" data-link-type="type" href="#typedef-media-query-list" id="ref-for-typedef-media-query-list①">&lt;media-query-list></a> parsing intentionally accepts an empty list.</p>
   <p class="note" role="note"><span>Note:</span> As per <a data-link-type="biblio" href="#biblio-css3syn">[CSS3SYN]</a>, tokens are <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive">ASCII case-insensitive</a>.</p>
<pre><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-query">&lt;media-query></dfn> = <a class="production" data-link-type="type" href="#typedef-media-condition" id="ref-for-typedef-media-condition">&lt;media-condition></a>
             | [ not | only ]? <a class="production" data-link-type="type" href="#typedef-media-type" id="ref-for-typedef-media-type">&lt;media-type></a> [ and <a class="production" data-link-type="type" href="#typedef-media-condition-without-or" id="ref-for-typedef-media-condition-without-or">&lt;media-condition-without-or></a> ]?
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-type">&lt;media-type></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-ident" id="ref-for-typedef-ident">&lt;ident></a>

<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-condition">&lt;media-condition></dfn> = <a class="production" data-link-type="type" href="#typedef-media-not" id="ref-for-typedef-media-not">&lt;media-not></a> | <a class="production" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens">&lt;media-in-parens></a> [ <a class="production" data-link-type="type" href="#typedef-media-and" id="ref-for-typedef-media-and">&lt;media-and></a>* | <a class="production" data-link-type="type" href="#typedef-media-or" id="ref-for-typedef-media-or">&lt;media-or></a>* ]
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-condition-without-or">&lt;media-condition-without-or></dfn> = <a class="production" data-link-type="type" href="#typedef-media-not" id="ref-for-typedef-media-not①">&lt;media-not></a> | <a class="production" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens①">&lt;media-in-parens></a> <a class="production" data-link-type="type" href="#typedef-media-and" id="ref-for-typedef-media-and①">&lt;media-and></a>*
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-not">&lt;media-not></dfn> = not <a class="production" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens②">&lt;media-in-parens></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-and">&lt;media-and></dfn> = and <a class="production" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens③">&lt;media-in-parens></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-or">&lt;media-or></dfn> = or <a class="production" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens④">&lt;media-in-parens></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-in-parens">&lt;media-in-parens></dfn> = ( <a class="production" data-link-type="type" href="#typedef-media-condition" id="ref-for-typedef-media-condition①">&lt;media-condition></a> ) | <a class="production" data-link-type="type" href="#typedef-media-feature" id="ref-for-typedef-media-feature">&lt;media-feature></a> | <a class="production" data-link-type="type" href="#typedef-general-enclosed" id="ref-for-typedef-general-enclosed">&lt;general-enclosed></a>

<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-media-feature">&lt;media-feature></dfn> = ( [ <a class="production" data-link-type="type" href="#typedef-mf-plain" id="ref-for-typedef-mf-plain">&lt;mf-plain></a> | <a class="production" data-link-type="type" href="#typedef-mf-boolean" id="ref-for-typedef-mf-boolean">&lt;mf-boolean></a> | <a class="production" data-link-type="type" href="#typedef-mf-range" id="ref-for-typedef-mf-range">&lt;mf-range></a> ] )
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-plain">&lt;mf-plain></dfn> = <a class="production" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name">&lt;mf-name></a> : <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value">&lt;mf-value></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-boolean">&lt;mf-boolean></dfn> = <a class="production" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name①">&lt;mf-name></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-range">&lt;mf-range></dfn> = <a class="production" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name②">&lt;mf-name></a> <a class="production" data-link-type="type" href="#typedef-mf-comparison" id="ref-for-typedef-mf-comparison">&lt;mf-comparison></a> <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value①">&lt;mf-value></a>
           | <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value②">&lt;mf-value></a> <a class="production" data-link-type="type" href="#typedef-mf-comparison" id="ref-for-typedef-mf-comparison①">&lt;mf-comparison></a> <a class="production" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name③">&lt;mf-name></a>
           | <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value③">&lt;mf-value></a> <a class="production" data-link-type="type" href="#typedef-mf-lt" id="ref-for-typedef-mf-lt">&lt;mf-lt></a> <a class="production" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name④">&lt;mf-name></a> <a class="production" data-link-type="type" href="#typedef-mf-lt" id="ref-for-typedef-mf-lt①">&lt;mf-lt></a> <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value④">&lt;mf-value></a>
           | <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value⑤">&lt;mf-value></a> <a class="production" data-link-type="type" href="#typedef-mf-gt" id="ref-for-typedef-mf-gt">&lt;mf-gt></a> <a class="production" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name⑤">&lt;mf-name></a> <a class="production" data-link-type="type" href="#typedef-mf-gt" id="ref-for-typedef-mf-gt①">&lt;mf-gt></a> <a class="production" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value⑥">&lt;mf-value></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-name">&lt;mf-name></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-ident" id="ref-for-typedef-ident①">&lt;ident></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-value">&lt;mf-value></dfn> = <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value" id="ref-for-number-value①">&lt;number></a> | <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-dimension" id="ref-for-typedef-dimension①">&lt;dimension></a> | <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-ident" id="ref-for-typedef-ident②">&lt;ident></a> | <a class="production" data-link-type="type" href="#typedef-ratio" id="ref-for-typedef-ratio">&lt;ratio></a>
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-lt">&lt;mf-lt></dfn> = '&lt;' '='?
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-gt">&lt;mf-gt></dfn> = '>' '='?
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-eq">&lt;mf-eq></dfn> = '='
<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-mf-comparison">&lt;mf-comparison></dfn> = <a class="production" data-link-type="type" href="#typedef-mf-lt" id="ref-for-typedef-mf-lt②">&lt;mf-lt></a> | <a class="production" data-link-type="type" href="#typedef-mf-gt" id="ref-for-typedef-mf-gt②">&lt;mf-gt></a> | <a class="production" data-link-type="type" href="#typedef-mf-eq" id="ref-for-typedef-mf-eq">&lt;mf-eq></a>

<dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-general-enclosed">&lt;general-enclosed></dfn> = [ <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-function-token" id="ref-for-typedef-function-token">&lt;function-token></a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-any-value" id="ref-for-typedef-any-value">&lt;any-value></a> ) ] | ( <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-ident" id="ref-for-typedef-ident③">&lt;ident></a> <a class="production" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-any-value" id="ref-for-typedef-any-value①">&lt;any-value></a> )
</pre>
   <p>The <a class="production css" data-link-type="type" href="#typedef-media-type" id="ref-for-typedef-media-type①">&lt;media-type></a> production does not include the keywords <a class="css" data-link-type="maybe" href="#valdef-media-only" id="ref-for-valdef-media-only④">only</a>, <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not⑤">not</a>, <span class="css">and</span>, and <span class="css">or</span>.</p>
   <p>No whitespace is allowed between the “&lt;” or “>” <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-delim-token" id="ref-for-typedef-delim-token">&lt;delim-token></a>s and the following “=” <span class="production" id="ref-for-typedef-delim-token①">&lt;delim-token></span>,
	if it’s present.</p>
   <p class="note" role="note"><span>Note:</span> Whitespace is required between a <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not⑥">not</a>, <span class="css">and</span>, or <span class="css">or</span> keyword
	and the following <span class="css">(</span> character,
	because without it that would instead parse as a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-function-token" id="ref-for-typedef-function-token①">&lt;function-token></a>.
	This is not made explicitly invalid because it’s already covered by the above grammar.
	It’s fine to have whitespace between a <span class="css">)</span> and a following keyword,
	however.</p>
   <p>When parsing the <a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens⑤">&lt;media-in-parens></a> production,
	the <a class="production css" data-link-type="type" href="#typedef-general-enclosed" id="ref-for-typedef-general-enclosed①">&lt;general-enclosed></a> branch must only be chosen if the input does not match either of the preceding branches. <span class="note"><a class="production css" data-link-type="type" href="#typedef-general-enclosed" id="ref-for-typedef-general-enclosed②">&lt;general-enclosed></a> exists to allow for future expansion of the grammar in a reasonably compatible way.</span></p>
   <h3 class="heading settled" data-level="3.1" id="evaluating"><span class="secno">3.1. </span><span class="content">Evaluating Media Queries</span><a class="self-link" href="#evaluating"></a></h3>
   <p>Each of the major subexpression of <a class="production css" data-link-type="type" href="#typedef-media-condition" id="ref-for-typedef-media-condition②">&lt;media-condition></a> or <a class="production css" data-link-type="type" href="#typedef-media-condition-without-or" id="ref-for-typedef-media-condition-without-or①">&lt;media-condition-without-or></a> is associated with a boolean result, as follows:</p>
   <dl>
    <dt><a class="production css" data-link-type="type" href="#typedef-media-condition" id="ref-for-typedef-media-condition③">&lt;media-condition></a> 
    <dt><a class="production css" data-link-type="type" href="#typedef-media-condition-without-or" id="ref-for-typedef-media-condition-without-or②">&lt;media-condition-without-or></a> 
    <dd> The result is the result of the child subexpression. 
    <dt><a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens⑥">&lt;media-in-parens></a> 
    <dd> The result is the result of the child term. 
    <dt><a class="production css" data-link-type="type" href="#typedef-media-not" id="ref-for-typedef-media-not②">&lt;media-not></a> 
    <dd> The result is the negation of the <a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens⑦">&lt;media-in-parens></a> term.
			The negation of unknown is unknown. 
    <dt><a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens⑧">&lt;media-in-parens></a> <a class="production css" data-link-type="type" href="#typedef-media-and" id="ref-for-typedef-media-and②">&lt;media-and></a>* 
    <dd> The result is true if the <a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens⑨">&lt;media-in-parens></a> child term
			and all of the <span class="production" id="ref-for-typedef-media-in-parens①⓪">&lt;media-in-parens></span> children of the <a class="production css" data-link-type="type" href="#typedef-media-and" id="ref-for-typedef-media-and③">&lt;media-and></a> child terms are true,
			false if at least one of these <span class="production" id="ref-for-typedef-media-in-parens①①">&lt;media-in-parens></span> terms are false,
			and unknown otherwise. 
    <dt><a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens①②">&lt;media-in-parens></a> <a class="production css" data-link-type="type" href="#typedef-media-or" id="ref-for-typedef-media-or①">&lt;media-or></a>* 
    <dd> The result is false if the <a class="production css" data-link-type="type" href="#typedef-media-in-parens" id="ref-for-typedef-media-in-parens①③">&lt;media-in-parens></a> child term
			and all of the <span class="production" id="ref-for-typedef-media-in-parens①④">&lt;media-in-parens></span> children of the <a class="production css" data-link-type="type" href="#typedef-media-or" id="ref-for-typedef-media-or②">&lt;media-or></a> child terms are false,
			true if at least one of these <span class="production" id="ref-for-typedef-media-in-parens①⑤">&lt;media-in-parens></span> terms are true,
			and unknown otherwise. 
    <dt><a class="production css" data-link-type="type" href="#typedef-general-enclosed" id="ref-for-typedef-general-enclosed③">&lt;general-enclosed></a> 
    <dd>
      The result is unknown. 
     <p>Authors must not use <a class="production css" data-link-type="type" href="#typedef-general-enclosed" id="ref-for-typedef-general-enclosed④">&lt;general-enclosed></a> in their stylesheets. <span class="note">It exists only for future-compatibility,
			so that new syntax additions do not invalidate too much of a <a class="production css" data-link-type="type" href="#typedef-media-condition" id="ref-for-typedef-media-condition④">&lt;media-condition></a> in older user agents.</span></p>
    <dt><a class="production css" data-link-type="type" href="#typedef-media-feature" id="ref-for-typedef-media-feature①">&lt;media-feature></a> 
    <dd> The result is the result of evaluating the specified media feature. 
   </dl>
   <p>If the result of any of the above productions
	is used in any context that expects a two-valued boolean,
	“unknown” must be converted to “false”.</p>
   <p class="note" role="note"><span>Note:</span> This means that,
	for example,
	when a <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②⑤">media query</a> is used in a <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①">@media</a> rule,
	if it resolves to “unknown” it’s treated as “false”
	and fails to match.</p>
   <div class="note" role="note">
     Media Queries use a three-value logic where terms can be “true”, “false”, or “unknown”.
		Specifically, it uses the <a href="http://en.wikipedia.org/wiki/Three-valued_logic#Kleene_and_Priest_logics">Kleene 3-valued logic</a>.
		In this logic, “unknown” means “either true or false, but we’re not sure which yet”. 
    <p>In general, an unknown value showing up in a formula will cause the formula to be unknown as well,
		as substituting “true” for the unknown will give the formula a different result than substituting “false”.
		The only way to eliminate an unknown value is to use it in a formula that will give the same result
		whether the unknown is replaced with a true or false value.
		This occurs when you have “false AND unknown” (evaluates to false regardless)
		and “true OR unknown” (evaluates to true regardless).</p>
    <p>This logic was adopted because <a class="production css" data-link-type="type" href="#typedef-general-enclosed" id="ref-for-typedef-general-enclosed⑤">&lt;general-enclosed></a> needs to be assigned a truth value.
		In standard boolean logic, the only reasonable value is “false”,
		but this means that <span class="css">not unknown(function)</span> is true,
		which can be confusing and unwanted.
		Kleen’s 3-valued logic ensures that unknown things will prevent a <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②⑥">media query</a> from matching,
		unless their value is irrelevant to the final result.</p>
   </div>
   <h3 class="heading settled" data-level="3.2" id="error-handling"><span class="secno">3.2. </span><span class="content"> Error Handling</span><a class="self-link" href="#error-handling"></a></h3>
   <p>A media query that does not match the grammar in the previous section must be replaced by <span class="css">not all</span> during parsing.</p>
   <p class="note" role="note"><span>Note:</span> Note that a grammar mismatch does <strong>not</strong> wipe out an entire <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list④">media query list</a>,
	just the problematic <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②⑦">media query</a>.
	The parsing behavior defined above automatically recovers at the next top-level comma.</p>
   <div class="example" id="example-bc6a6750">
    <a class="self-link" href="#example-bc6a6750"></a> 
<pre>@media (example, all,), speech { /* only applicable to speech devices */ }
@media &amp;test, speech           { /* only applicable to speech devices */ }
</pre>
    <p>Both of the above <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list⑤">media query lists</a> are turned into <span class="css">not all, speech</span> during parsing,
		which has the same truth value as just <a class="css" data-link-type="maybe" href="#valdef-media-speech" id="ref-for-valdef-media-speech②">speech</a>.</p>
    <p>Note that error-recovery only happens at the top-level of a <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②⑧">media query</a>;
		anything inside of an invalid parenthesized block
		will just get turned into <span class="css">not all</span> as a group.
		For example:</p>
<pre>@media (example, speech { /* rules for speech devices */ }
</pre>
    <p>Because the parenthesized block is unclosed,
		it will contain the entire rest of the stylesheet from that point
		(unless it happens to encounter an unmatched “)” character somewhere in the stylesheet),
		and turn the entire thing into a <span class="css">not all</span> <a data-link-type="dfn" href="#media-query" id="ref-for-media-query②⑨">media query</a>.</p>
   </div>
   <p>An unknown <a class="production css" data-link-type="type" href="#typedef-media-type" id="ref-for-typedef-media-type②">&lt;media-type></a> must be treated as not matching.</p>
   <div class="example" id="example-2b46833d">
    <a class="self-link" href="#example-2b46833d"></a> For example, the media query <span class="css">unknown</span> is false,
		as <span class="css">unknown</span> is an unknown <a data-link-type="dfn" href="#media-type" id="ref-for-media-type②①">media type</a>. 
    <p>But <span class="css">not unknown</span> is true, as the <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not⑦">not</a> negates the false media type.</p>
   </div>
   <div class="example" id="example-45dbfecd"><a class="self-link" href="#example-45dbfecd"></a> Remember that some keywords aren’t allowed as <a class="production css" data-link-type="type" href="#typedef-media-type" id="ref-for-typedef-media-type③">&lt;media-type></a>s
		and cause parsing to fail entirely:
		the media query <span class="css">or and (color)</span> is turned into <span class="css">not all</span> during parsing,
		rather than just treating the <span class="css">or</span> as an unknown <a data-link-type="dfn" href="#media-type" id="ref-for-media-type②②">media type</a>. </div>
   <p>An unknown <a class="production css" data-link-type="type" href="#typedef-mf-name" id="ref-for-typedef-mf-name⑥">&lt;mf-name></a> or <a class="production css" data-link-type="type" href="#typedef-mf-value" id="ref-for-typedef-mf-value⑦">&lt;mf-value></a>, or disallowed <span class="production" id="ref-for-typedef-mf-value⑧">&lt;mf-value></span>,
	results in the value “unknown”.
	A <a class="production css" data-link-type="type" href="#typedef-media-query" id="ref-for-typedef-media-query②">&lt;media-query></a> whose value is “unknown” must be replaced with <span class="css">not all</span>.</p>
   <div class="example" id="example-d129d027">
    <a class="self-link" href="#example-d129d027"></a> 
<pre>&lt;link media="screen and (max-weight: 3kg) and (color), (color)"rel="stylesheet" href="example.css" /></pre>
    <p>As <span class="css">max-weight</span> is an unknown <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③⓪">media feature</a>,
		this <a data-link-type="dfn" href="#media-query-list" id="ref-for-media-query-list⑥">media query list</a> is turned into <span class="css">not all, (color)</span>,
		which is equivalent to just <span class="css">(color)</span>.</p>
   </div>
   <div class="example" id="example-e8d8bc30">
    <a class="self-link" href="#example-e8d8bc30"></a> 
<pre>@media (min-orientation:portrait) { … }</pre>
    <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-orientation" id="ref-for-descdef-media-orientation">orientation</a> feature does not accept prefixes,
		so this is considered an unknown <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③①">media feature</a>,
		and turned into <span class="css">not all</span>.</p>
   </div>
   <div class="example" id="example-951a2717"><a class="self-link" href="#example-951a2717"></a> The media query <span class="css">(color:20example)</span> specifies an unknown value for the <a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color②">color</a> media feature
		and is therefore turned into <span class="css">not all</span>. </div>
   <div class="note" role="note">
     Note that <a data-link-type="dfn" href="#media-query" id="ref-for-media-query③⓪">media queries</a> are also subject to the parsing rules of the host language.
		For example, take the following CSS snippet: 
<pre>@media test;,all { body { background:lime } }</pre>
    <p>The media query <span class="css">test;,all</span> is, parsed by itself,
		equivalent to <span class="css">not all, all</span>, which is always true.
		However, CSS’s parsing rules cause the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media②">@media</a> rule,
		and thus the <a data-link-type="dfn" href="#media-query" id="ref-for-media-query③①">media query</a>,
		to end at the semicolon.
		The remainder of the text is treated as a style rule
		with an invalid selector and contents.</p>
   </div>
   <h2 class="heading settled" data-level="4" id="mf-dimensions"><span class="secno">4. </span><span class="content"> Viewport/Page Dimensions Media Features</span><a class="self-link" href="#mf-dimensions"></a></h2>
   <h3 class="heading settled" data-level="4.1" id="width"><span class="secno">4.1. </span><span class="content"> Width: the <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width③">width</a> feature</span><a class="self-link" href="#width"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-width">width</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media③">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width④">width</a> media feature describes the width of the targeted display area of the output device.
	For continuous media, this is the width of the viewport
	(as described by CSS2, section 9.1.1 <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>)
	including the size of a rendered scroll bar (if any).
	For paged media, this is the width of the page box
	(as described by CSS2, section 13.2 <span>[CSS21]</span>).</p>
   <p><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value①" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>s are interpreted according to <a href="#units">§ 1.3 Units</a>.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width⑤">width</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range">false in the negative range</a>.</p>
   <div class="example" id="example-3ef57809">
    <a class="self-link" href="#example-3ef57809"></a> For example, this media query expresses that the style sheet is used on printed output wider than 25cm: 
<pre>&lt;link rel="stylesheet" media="print and (min-width: 25cm)" href="http://…" /></pre>
   </div>
   <div class="example" id="example-462c5899">
    <a class="self-link" href="#example-462c5899"></a> This media query expresses that the style sheet is used on devices with viewport
		(the part of the screen/paper where the document is rendered)
		widths between 400 and 700 pixels: 
<pre>@media (400px &lt;= width &lt;= 700px) { … }</pre>
   </div>
   <div class="example" id="example-fab3f079">
    <a class="self-link" href="#example-fab3f079"></a> This media query expresses that style sheet is used if the width of the viewport is greater than 20em. 
<pre>@media (min-width: 20em) { … }</pre>
    <p>The <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#em" id="ref-for-em①">em</a> value is relative to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#initial-value" id="ref-for-initial-value②">initial value</a> of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size" id="ref-for-propdef-font-size①">font-size</a>.</p>
   </div>
   <h3 class="heading settled" data-level="4.2" id="height"><span class="secno">4.2. </span><span class="content"> Height: the <a class="property" data-link-type="propdesc" href="#descdef-media-height" id="ref-for-descdef-media-height">height</a> feature</span><a class="self-link" href="#height"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-height">height</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media④">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value②" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-height" id="ref-for-descdef-media-height①">height</a> media feature describes the height of the targeted display area of the output device.
	For continuous media, this is the height of the viewport including the size of a rendered scroll bar (if any).
	For paged media, this is the height of the page box.</p>
   <p><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value③" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a>s are interpreted according to <a href="#units">§ 1.3 Units</a>.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-height" id="ref-for-descdef-media-height②">height</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range①">false in the negative range</a>.</p>
   <h3 class="heading settled" data-level="4.3" id="aspect-ratio"><span class="secno">4.3. </span><span class="content"> Aspect-Ratio: the <a class="property" data-link-type="propdesc" href="#descdef-media-aspect-ratio" id="ref-for-descdef-media-aspect-ratio">aspect-ratio</a> feature</span><a class="self-link" href="#aspect-ratio"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-aspect-ratio">aspect-ratio</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media⑤">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="#typedef-ratio" id="ref-for-typedef-ratio①">&lt;ratio></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-aspect-ratio" id="ref-for-descdef-media-aspect-ratio①">aspect-ratio</a> media feature is defined as the ratio of the value of the <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width⑥">width</a> media feature
	to the value of the <a class="property" data-link-type="propdesc" href="#descdef-media-height" id="ref-for-descdef-media-height③">height</a> media feature.</p>
   <p>The <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-ratio">&lt;ratio></dfn> value type is a positive (not zero or negative) <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value" id="ref-for-integer-value①">&lt;integer></a> followed by optional whitespace, followed by a solidus ('/'),
	followed by optional whitespace, followed by a positive <span class="production" id="ref-for-integer-value②">&lt;integer></span>. <a class="production css" data-link-type="type" href="#typedef-ratio" id="ref-for-typedef-ratio②">&lt;ratio></a>s can be ordered or compared by transforming them into the number
	obtained by dividing their first <span class="production" id="ref-for-integer-value③">&lt;integer></span> by their second <span class="production" id="ref-for-integer-value④">&lt;integer></span>.</p>
   <h3 class="heading settled" data-level="4.4" id="orientation"><span class="secno">4.4. </span><span class="content"> Orientation: the <a class="property" data-link-type="propdesc" href="#descdef-media-orientation" id="ref-for-descdef-media-orientation①">orientation</a> feature</span><a class="self-link" href="#orientation"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-orientation">orientation</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media⑥">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">portrait <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> landscape 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/orientation" data-dfn-type="value" data-export id="valdef-media-orientation-portrait">portrait</dfn> 
    <dd>The <a class="property" data-link-type="propdesc" href="#descdef-media-orientation" id="ref-for-descdef-media-orientation②">orientation</a> media feature is <a class="css" data-link-type="maybe" href="#valdef-media-orientation-portrait" id="ref-for-valdef-media-orientation-portrait">portrait</a> when the value of the <a class="property" data-link-type="propdesc" href="#descdef-media-height" id="ref-for-descdef-media-height④">height</a> media feature is greater than or equal to
		the value of the <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width⑦">width</a> media feature. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/orientation" data-dfn-type="value" data-export id="valdef-media-orientation-landscape">landscape</dfn> 
    <dd>Otherwise <a class="property" data-link-type="propdesc" href="#descdef-media-orientation" id="ref-for-descdef-media-orientation③">orientation</a> is <a class="css" data-link-type="maybe" href="#valdef-media-orientation-landscape" id="ref-for-valdef-media-orientation-landscape">landscape</a>. 
   </dl>
   <div class="example" id="example-cd688c88">
    <a class="self-link" href="#example-cd688c88"></a> The following media query tests for “portrait” orientation,
		like a phone held upright. 
<pre>@media (orientation:portrait) { … }</pre>
   </div>
   <h2 class="heading settled" data-level="5" id="mf-display-quality"><span class="secno">5. </span><span class="content"> Display Quality Media Features</span><a class="self-link" href="#mf-display-quality"></a></h2>
   <h3 class="heading settled caniuse-paneled" data-level="5.1" id="resolution"><span class="secno">5.1. </span><span class="content"> Display Resolution: the <a class="property" data-link-type="propdesc" href="#descdef-media-resolution" id="ref-for-descdef-media-resolution①">resolution</a> feature</span><a class="self-link" href="#resolution"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-resolution">resolution</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media⑦">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value①" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①">|</a> infinite 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-resolution" id="ref-for-descdef-media-resolution②">resolution</a> media feature describes the resolution of the output
	device, i.e. the density of the pixels, taking into account the <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#page-zoom" id="ref-for-page-zoom">page zoom</a> but assuming a <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#pinch-zoom" id="ref-for-pinch-zoom">pinch zoom</a> of 1.0.</p>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-resolution" id="ref-for-descdef-media-resolution③">resolution</a> media feature is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range②">false in the negative range</a></p>
   <p>When querying media with non-square pixels, <a class="property" data-link-type="propdesc" href="#descdef-media-resolution" id="ref-for-descdef-media-resolution④">resolution</a> queries the density in the vertical dimension.</p>
   <p>For printers, this corresponds to the screening resolution
	(the resolution for printing dots of arbitrary color).
	Printers might have a different resolution for grayscale printing.</p>
   <p>For output mediums that have no physical constraints on resolution
	(such as outputting to vector graphics),
	this feature must match the <dfn class="dfn-paneled css" data-dfn-for="@media/resolution" data-dfn-type="value" data-export id="valdef-media-resolution-infinite">infinite</dfn> value.
	For the purpose of evaluating this media feature in the <a data-link-type="dfn" href="#range-context" id="ref-for-range-context④">range context</a>, <a class="css" data-link-type="maybe" href="#valdef-media-resolution-infinite" id="ref-for-valdef-media-resolution-infinite">infinite</a> must be treated as larger than any possible <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value②" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a>.
	(That is, a query like <span class="css">(resolution > 1000dpi)</span> will be true for an <span class="css" id="ref-for-valdef-media-resolution-infinite①">infinite</span> media.)</p>
   <div class="example" id="example-4141fdad">
    <a class="self-link" href="#example-4141fdad"></a> This media query simply detects “high-resolution” screens
		(those with a hardware pixel to CSS <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#px" id="ref-for-px">px</a> ratio of at least 2): 
<pre>@media (resolution >= 2dppx)</pre>
   </div>
   <div class="example" id="example-618117ac">
    <a class="self-link" href="#example-618117ac"></a> For example, this media query expresses that a style sheet is used on devices with resolution greater than 300 dots per CSS <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-3/#in" id="ref-for-in">in</a>: 
<pre>@media print and (min-resolution: 300dpi) { … }</pre>
    <p>This media query is equivalent, but uses the CSS <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#cm" id="ref-for-cm">cm</a> unit:</p>
<pre>@media print and (min-resolution: 118dpcm) { … }</pre>
   </div>
   <div class="note" role="note">
     <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#resolution-value" id="ref-for-resolution-value③" title="Expands to: dppx | x | dpcm | dpi">&lt;resolution></a> does not refer to the number of device pixels per physical length unit,
		but the number of device pixels per css unit.
		This mapping is done by the user agent,
		so it is always known to the user agent. 
    <p>If the user agent either has no knowledge of the geometry of physical pixels,
		or knows about the geometry physical pixels and they are (close enough to)
		square, it would not map a different number of device pixels per css pixels
		along each axis, and the would therefore be no difference between the vertical
		and horizontal resolution.</p>
    <p>Otherwise, if the UA choses to map a different number along each axis,
		this would be to respond to physical pixels not being square either. How
		the UA comes to this knowledge is out of scope, but having enough information
		to take this decision, it can invert the mapping should the device be rotated 90 degrees.</p>
   </div>
   <h3 class="heading settled" data-level="5.2" id="scan"><span class="secno">5.2. </span><span class="content"> Display Type: the <a class="property" data-link-type="propdesc" href="#descdef-media-scan" id="ref-for-descdef-media-scan①">scan</a> feature</span><a class="self-link" href="#scan"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-scan">scan</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media⑧">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">interlace <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②">|</a> progressive 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-scan" id="ref-for-descdef-media-scan②">scan</a> media feature describes the scanning process of some output devices.</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="@media/scan" data-dfn-type="value" data-export id="valdef-media-scan-interlace">interlace<a class="self-link" href="#valdef-media-scan-interlace"></a></dfn> 
    <dd>
      CRT and some types of plasma TV screens used “interlaced” rendering,
			where video frames alternated between specifying only the “even” lines on the screen
			and only the “odd” lines,
			exploiting various automatic mental image-correction abilities to produce smooth motion.
			This allowed them to simulate a higher FPS broadcast at half the bandwidth cost. 
     <p>When displaying on interlaced screens,
			authors should avoid very fast movement across the screen to avoid “combing”,
			and should ensure that details on the screen are wider than <span class="css">1px</span> to avoid <a href="https://en.wikipedia.org/wiki/Interlaced_video#Interline_twitter">“twitter”</a>.</p>
    <dt><dfn class="css" data-dfn-for="@media/scan" data-dfn-type="value" data-export id="valdef-media-scan-progressive">progressive<a class="self-link" href="#valdef-media-scan-progressive"></a></dfn> 
    <dd>
      A screen using “progressive” rendering displays each screen fully,
			and needs no special treatment. 
     <p>Most modern screens, and all computer screens, use progressive rendering.</p>
   </dl>
   <div class="example" id="example-3db7de6d">
    <a class="self-link" href="#example-3db7de6d"></a> For example, the “feet” of letters in serif fonts are very small features that can provoke “twitter” on interlaced devices.
		The <a class="property" data-link-type="propdesc" href="#descdef-media-scan" id="ref-for-descdef-media-scan③">scan</a> media feature can be used to detect this,
		and use an alternative font with less chance of “twitter”: 
<pre>@media (scan: interlace) { body { font-family: sans-serif; } }</pre>
   </div>
   <p class="note" role="note"><span>Note:</span> At the time of writing, all known implementations match <code>scan: progressive</code> rather than <code>scan: interlace</code>.</p>
   <h3 class="heading settled" data-level="5.3" id="grid"><span class="secno">5.3. </span><span class="content"> Detecting Console Displays: the <a class="property" data-link-type="propdesc" href="#descdef-media-grid" id="ref-for-descdef-media-grid③">grid</a> feature</span><a class="self-link" href="#grid"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-grid">grid</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media⑨">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="#typedef-mq-boolean" id="ref-for-typedef-mq-boolean">&lt;mq-boolean></a> 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-grid" id="ref-for-descdef-media-grid④">grid</a> media feature is used to query whether the output device is grid or bitmap.
	If the output device is grid-based
	(e.g., a “tty” terminal, or a phone display with only one fixed font),
	the value will be 1.
	Otherwise, the value will be 0.</p>
   <p>The <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-mq-boolean">&lt;mq-boolean></dfn> value type is an <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value" id="ref-for-integer-value⑤">&lt;integer></a> with the value <span class="css">0</span> or <span class="css">1</span>.
	Any other integer value is invalid. <span class="note">Note that <span class="css">-0</span> is always equivalent to <span class="css">0</span> in CSS,
	and so is also accepted as a valid <a class="production css" data-link-type="type" href="#typedef-mq-boolean" id="ref-for-typedef-mq-boolean①">&lt;mq-boolean></a> value.</span></p>
   <p class="note" role="note"><span>Note:</span> The <a class="production css" data-link-type="type" href="#typedef-mq-boolean" id="ref-for-typedef-mq-boolean②">&lt;mq-boolean></a> type exists only for legacy purposes.
	If this feature were being designed today,
	it would instead use proper named keywords for its values.</p>
   <div class="example" id="example-07e10c7e">
    <a class="self-link" href="#example-07e10c7e"></a> Here is an example that detects a narrow console screen: 
<pre>@media (grid) and (max-width: 15em) { … }
</pre>
   </div>
   <p class="note" role="note"><span>Note:</span> At the time of writing, all known implementations match <code>grid: 0</code> rather than <code>grid: 1</code>.</p>
   <h3 class="heading settled" data-level="5.4" id="update"><span class="secno">5.4. </span><span class="content"> Display Update Frequency: the <a class="property" data-link-type="propdesc" href="#descdef-media-update" id="ref-for-descdef-media-update①">update</a> feature</span><a class="self-link" href="#update"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-update">update</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①⓪">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③">|</a> slow <span id="ref-for-comb-one④">|</span> fast 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-update" id="ref-for-descdef-media-update②">update</a> media feature is used to query the ability of the output device
	to modify the apearance of content once it has been rendered.
	It accepts the following values:</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/update" data-dfn-type="value" data-export id="valdef-media-update-none">none</dfn> 
    <dd> Once it has been rendered, the layout can no longer be updated.
			Example: documents printed on paper. 
    <dt><dfn class="css" data-dfn-for="@media/update" data-dfn-type="value" data-export id="valdef-media-update-slow">slow<a class="self-link" href="#valdef-media-update-slow"></a></dfn> 
    <dd> The layout may change dynamically according to the usual rules of CSS,
			but the output device is not able to render or display changes quickly enough
			for them to be perceived as a smooth animation.
			Example: E-ink screens or severely under-powered devices. 
    <dt><dfn class="css" data-dfn-for="@media/update" data-dfn-type="value" data-export id="valdef-media-update-fast">fast<a class="self-link" href="#valdef-media-update-fast"></a></dfn> 
    <dd> The layout may change dynamically according to the usual rules of CSS,
			and the output device is not unusually constrained in speed,
			so regularly-updating things like CSS Animations can be used.
			Example: computer screens. 
   </dl>
   <div class="example" id="example-57cc8bd6">
    <a class="self-link" href="#example-57cc8bd6"></a> For example, if a page styles its links to only add underlines on hover,
		it may want to always display underlines when printed: 
<pre>@media (update) {
  a { text-decoration: none; }
  a:hover, a:focus { text-decoration: underline; }
}
/* In non-updating UAs, the links get their default underline at all times. */
</pre>
   </div>
   <h3 class="heading settled" data-level="5.5" id="mf-overflow-block"><span class="secno">5.5. </span><span class="content"> Block-Axis Overflow: the <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-block" id="ref-for-descdef-media-overflow-block">overflow-block</a> feature</span><a class="self-link" href="#mf-overflow-block"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-overflow-block">overflow-block</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①①">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> scroll <span id="ref-for-comb-one⑥">|</span> optional-paged <span id="ref-for-comb-one⑦">|</span> paged 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-block" id="ref-for-descdef-media-overflow-block①">overflow-block</a> media feature describes the behavior of the device
	when content overflows the initial containing block in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis">block axis</a>.</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="@media/overflow-block" data-dfn-type="value" data-export id="valdef-media-overflow-block-none">none<a class="self-link" href="#valdef-media-overflow-block-none"></a></dfn> 
    <dd> There is no affordance for overflow in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis①">block axis</a>;
			any overflowing content is simply not displayed.
			Examples: billboards 
    <dt><dfn class="css" data-dfn-for="@media/overflow-block" data-dfn-type="value" data-export id="valdef-media-overflow-block-scroll">scroll<a class="self-link" href="#valdef-media-overflow-block-scroll"></a></dfn> 
    <dd> Overflowing content in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis②">block axis</a> is exposed by allowing users to scroll to it.
			Examples: computer screens 
    <dt><dfn class="css" data-dfn-for="@media/overflow-block" data-dfn-type="value" data-export id="valdef-media-overflow-block-optional-paged">optional-paged<a class="self-link" href="#valdef-media-overflow-block-optional-paged"></a></dfn> 
    <dd> Overflowing content in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis③">block axis</a> is exposed by allowing users to scroll to it,
			but page breaks can be manually triggered
			(<span class="non-normative">such as via <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-break-3/#propdef-break-inside" id="ref-for-propdef-break-inside">break-inside</a>, etc</span>)
			to cause the following content to display on the following page.
			Examples: slideshows 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/overflow-block" data-dfn-type="value" data-export id="valdef-media-overflow-block-paged">paged</dfn> 
    <dd> Content is broken up into discrete pages;
			content that overflows one page in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#block-axis" id="ref-for-block-axis④">block axis</a> is displayed on the following page.
			Examples: printers, ebook readers 
   </dl>
   <h3 class="heading settled" data-level="5.6" id="mf-overflow-inline"><span class="secno">5.6. </span><span class="content"> Inline-Axis Overflow: the <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-inline" id="ref-for-descdef-media-overflow-inline">overflow-inline</a> feature</span><a class="self-link" href="#mf-overflow-inline"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-overflow-inline">overflow-inline</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①②">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑧">|</a> scroll 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-inline" id="ref-for-descdef-media-overflow-inline①">overflow-inline</a> media feature describes the behavior of the device
	when content overflows the initial containing block in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis" id="ref-for-inline-axis">inline axis</a>.</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="@media/overflow-inline" data-dfn-type="value" data-export id="valdef-media-overflow-inline-none">none<a class="self-link" href="#valdef-media-overflow-inline-none"></a></dfn> 
    <dd> There is no affordance for overflow in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis" id="ref-for-inline-axis①">inline axis</a>;
			any overflowing content is simply not displayed. 
    <dt><dfn class="css" data-dfn-for="@media/overflow-inline" data-dfn-type="value" data-export id="valdef-media-overflow-inline-scroll">scroll<a class="self-link" href="#valdef-media-overflow-inline-scroll"></a></dfn> 
    <dd> Overflowing content in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis" id="ref-for-inline-axis②">inline axis</a> is exposed by allowing users to scroll to it. 
   </dl>
   <p class="note" role="note"><span>Note:</span> There are no known implementations of paged overflow of inline-overflowing content,
	and the very concept doesn’t seem to make much sense,
	so there is intentionally no <a class="css" data-link-type="maybe" href="#valdef-media-overflow-block-paged" id="ref-for-valdef-media-overflow-block-paged">paged</a> value for <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-inline" id="ref-for-descdef-media-overflow-inline②">overflow-inline</a>.</p>
   <h2 class="heading settled" data-level="6" id="mf-colors"><span class="secno">6. </span><span class="content"> Color Media Features</span><a class="self-link" href="#mf-colors"></a></h2>
   <h3 class="heading settled" data-level="6.1" id="color"><span class="secno">6.1. </span><span class="content"> Color Depth: the <a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color③">color</a> feature</span><a class="self-link" href="#color"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-color">color</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①③">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value" id="ref-for-integer-value⑥">&lt;integer></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color④">color</a> media feature describes the number of bits per color component of the output device.
	If the device is not a color device, the value is zero.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color⑤">color</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range③">false in the negative range</a>.</p>
   <div class="example" id="example-8d42e196">
    <a class="self-link" href="#example-8d42e196"></a> For example, these two media queries express that a style sheet applies to all color devices: 
<pre>@media (color) { … }
@media (min-color: 1) { … }
</pre>
   </div>
   <div class="example" id="example-f33339f9">
    <a class="self-link" href="#example-f33339f9"></a> This media query expresses that a style sheet applies to color devices
		with at least 8 bits per color component: 
<pre>@media (color >= 8) { … }</pre>
   </div>
   <p>If different color components are represented by different number of bits,
	the smallest number is used.</p>
   <div class="example" id="example-d1c7ceef"><a class="self-link" href="#example-d1c7ceef"></a> For instance, if an 8-bit color system
		represents the red component with 3 bits, the green component with 3 bits, and the blue component with 2 bits,
		the <a class="property" data-link-type="propdesc" href="#descdef-media-color" id="ref-for-descdef-media-color⑥">color</a> media feature will have a value of 2. </div>
   <p>In a device with indexed colors,
	the minimum number of bits per color component in the lookup table is used.</p>
   <p class="note" role="note"><span>Note:</span> The described functionality is only able to describe color capabilities at a superficial level. <a class="property" data-link-type="propdesc" href="#descdef-media-color-gamut" id="ref-for-descdef-media-color-gamut">color-gamut</a>, is generally more relevant to authors’ needs.
	If further functionality is required,
	RFC2879 <a data-link-type="biblio" href="#biblio-rfc2879">[RFC2879]</a> provides more specific media features which may be supported at a later stage.</p>
   <h3 class="heading settled" data-level="6.2" id="color-index"><span class="secno">6.2. </span><span class="content"> Paletted Color Screens: the <a class="property" data-link-type="propdesc" href="#descdef-media-color-index" id="ref-for-descdef-media-color-index">color-index</a> feature</span><a class="self-link" href="#color-index"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-color-index">color-index</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①④">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value" id="ref-for-integer-value⑦">&lt;integer></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-color-index" id="ref-for-descdef-media-color-index①">color-index</a> media feature describes the number of entries in the color lookup table of the output device.
	If the device does not use a color lookup table, the value is zero.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-color-index" id="ref-for-descdef-media-color-index②">color-index</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range④">false in the negative range</a>.</p>
   <div class="example" id="example-d0764fe1">
    <a class="self-link" href="#example-d0764fe1"></a> For example, here are two ways to express that a style sheet applies to all color index devices: 
<pre>@media (color-index) { … }
@media (color-index >= 1) { … }
</pre>
   </div>
   <div class="example" id="example-0fec94ea">
    <a class="self-link" href="#example-0fec94ea"></a> This media query expresses that a style sheet applies to a color index device with 256 or more entries: 
<pre>&lt;?xml-stylesheet media="(min-color-index: 256)"
  href="http://www.example.com/…" ?>
</pre>
   </div>
   <h3 class="heading settled" data-level="6.3" id="monochrome"><span class="secno">6.3. </span><span class="content"> Monochrome Screens: the <a class="property" data-link-type="propdesc" href="#descdef-media-monochrome" id="ref-for-descdef-media-monochrome">monochrome</a> feature</span><a class="self-link" href="#monochrome"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-monochrome">monochrome</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①⑤">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value" id="ref-for-integer-value⑧">&lt;integer></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-monochrome" id="ref-for-descdef-media-monochrome①">monochrome</a> media feature describes the number of bits per pixel in a monochrome frame buffer.
	If the device is not a monochrome device,
	the output device value will be 0.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-monochrome" id="ref-for-descdef-media-monochrome②">monochrome</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range⑤">false in the negative range</a>.</p>
   <div class="example" id="example-fa837be6">
    <a class="self-link" href="#example-fa837be6"></a> For example, this is how to express that a style sheet applies to all monochrome devices: 
<pre>@media (monochrome) { … }</pre>
   </div>
   <div class="example" id="example-83e2c204">
    <a class="self-link" href="#example-83e2c204"></a> Express that a style sheet applies to monochrome devices with more than 2 bits per pixels: 
<pre>@media (monochrome >= 2) { … }</pre>
   </div>
   <div class="example" id="example-60bef5a3">
    <a class="self-link" href="#example-60bef5a3"></a> Express that there is one style sheet for color pages and another for monochrome: 
<pre>&lt;link rel="stylesheet" media="print and (color)" href="http://…" />
&lt;link rel="stylesheet" media="print and (monochrome)" href="http://…" />
</pre>
   </div>
   <h3 class="heading settled" data-level="6.4" id="color-gamut"><span class="secno">6.4. </span><span class="content"> Color Display Quality: the <a class="property" data-link-type="propdesc" href="#descdef-media-color-gamut" id="ref-for-descdef-media-color-gamut①">color-gamut</a> feature</span><a class="self-link" href="#color-gamut"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-color-gamut">color-gamut</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①⑥">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">srgb <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑨">|</a> p3 <span id="ref-for-comb-one①⓪">|</span> rec2020 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-color-gamut" id="ref-for-descdef-media-color-gamut②">color-gamut</a> media feature describes the approximate range of colors
	that are supported by the UA and output device.
	That is, if the UA receives content with colors in the specified space
	it can cause the output device to render the appropriate color,
	or something appropriately close enough.</p>
   <p class="note" role="note"><span>Note:</span> The query uses approximate ranges for a few reasons.
	Firstly, there are a lot of differences in display hardware.
	For example, a device might claim to support "Rec. 2020",
	but actually renders a significantly lower range of the full gamut.
	Secondly, there are a lot of different color ranges that different devices support,
	and enumerating them all would be tedious.
	In most cases the author does not need to know the exact capabilities of the display,
	just whether it is better than sRGB,
	or significantly better than sRGB.
	That way they can serve appropriate images,
	tagged with color profiles,
	to the user.</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/color-gamut" data-dfn-type="value" data-export id="valdef-media-color-gamut-srgb">srgb</dfn> 
    <dd>
      The UA and output device can support approximately the sRGB gamut or more. 
     <p class="note" role="note"><span>Note:</span> It is expected that the vast majority of color displays
			will be able to return true to a query of this type.</p>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/color-gamut" data-dfn-type="value" data-export id="valdef-media-color-gamut-p3">p3</dfn> 
    <dd>
      The UA and output device can support approximately the gamut
			specified by the DCI P3 Color Space or more. 
     <p class="note" role="note"><span>Note:</span> The <a class="css" data-link-type="maybe" href="#valdef-media-color-gamut-p3" id="ref-for-valdef-media-color-gamut-p3">p3</a> gamut is larger than and includes the <a class="css" data-link-type="maybe" href="#valdef-media-color-gamut-srgb" id="ref-for-valdef-media-color-gamut-srgb">srgb</a> gamut.</p>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/color-gamut" data-dfn-type="value" data-export id="valdef-media-color-gamut-rec2020">rec2020</dfn> 
    <dd>
      The UA and output device can support approximately the gamut
			specified by the ITU-R Recommendation BT.2020 Color Space or more. 
     <p class="note" role="note"><span>Note:</span> The <a class="css" data-link-type="maybe" href="#valdef-media-color-gamut-rec2020" id="ref-for-valdef-media-color-gamut-rec2020">rec2020</a> gamut is larger than and includes the <a class="css" data-link-type="maybe" href="#valdef-media-color-gamut-p3" id="ref-for-valdef-media-color-gamut-p3①">p3</a> gamut.</p>
   </dl>
   <p>The following table lists the primary colors of these color spaces in terms of their color space chromaticity coordinates,
	as defined in <a data-link-type="biblio" href="#biblio-colorimetry">[COLORIMETRY]</a>.</p>
   <table class="data">
    <colgroup span="1">
    <colgroup span="2">
    <colgroup span="2">
    <colgroup span="2">
    <colgroup span="2">
    <thead>
     <tr>
      <th rowspan="3">Color Space
      <th colspan="2" rowspan="2">White Point
      <th colspan="6">Primaries 
     <tr>
      <th colspan="2">Red
      <th colspan="2">Green
      <th colspan="2">Blue 
     <tr>
      <th>x<sub>W</sub>
      <th>y<sub>W</sub>
      <th>x<sub>R</sub>
      <th>y<sub>R</sub>
      <th>x<sub>G</sub>
      <th>y<sub>G</sub>
      <th>x<sub>B</sub>
      <th>y<sub>B</sub> 
    <tbody>
     <tr>
      <td>srgb
      <td>0.3127
      <td>0.3290
      <td>0.640
      <td>0.330
      <td>0.300
      <td>0.600
      <td>0.150
      <td>0.060 
     <tr>
      <td>p3
      <td>0.3127
      <td>0.3290
      <td>0.680
      <td>0.320
      <td>0.265
      <td>0.690
      <td>0.150
      <td>0.060 
     <tr>
      <td>rec2020
      <td>0.3127
      <td>0.3290
      <td>0.708
      <td>0.292
      <td>0.170
      <td>0.797
      <td>0.131
      <td>0.046 
   </table>
   <p class="note" role="note"><span>Note:</span> The table above does not contains enough information to fully describe the color spaces,
	but is sufficient to determine whether an output device approximately covers their respective gamuts.
	See <a data-link-type="biblio" href="#biblio-srgb">[SRGB]</a> for more information on sRGB, <a data-link-type="biblio" href="#biblio-smpte-eg-432-1-2010">[SMPTE-EG-432-1-2010]</a> and <a data-link-type="biblio" href="#biblio-smpte-rp-431-2-2011">[SMPTE-RP-431-2-2011]</a> for more information on DCI P3,
	and <a data-link-type="biblio" href="#biblio-itu-r-bt-2020-2">[ITU-R-BT-2020-2]</a> for more information on ITU-R Recommendation BT.2020.</p>
   <div class="example" id="example-6fba5b94">
    <a class="self-link" href="#example-6fba5b94"></a> For example, this media query applies when the display supports colors
		in the range of DCI P3: 
<pre class="lang-css highlight"><c- n>@media</c-> <c- p>(</c->color-gamut<c- f>: p3) </c-><c- p>{</c-> … }
</pre>
   </div>
   <p class="note" role="note"><span>Note:</span> An output device can return true for multiple values of this media feature,
	if its full output gamut is large enough,
	or one gamut is a subset of another supported gamut.
	As a result,
	this feature is best used in an "ascending" fashion—<wbr>set a base value when <span class="css">(color-gamut: srgb)</span> is true,
	then override it if <span class="css">(color-gamut: p3)</span> is true, etc.</p>
   <p class="note" role="note"><span>Note:</span> Some output devices,
	such as monochrome displays,
	cannot support even the <a class="css" data-link-type="maybe" href="#valdef-media-color-gamut-srgb" id="ref-for-valdef-media-color-gamut-srgb①">srgb</a> gamut.
	To test for these devices,
	you can use this feature in a negated boolean-context fashion: <span class="css">not (color-gamut)</span>.</p>
   <h2 class="heading settled caniuse-paneled" data-level="7" id="mf-interaction"><span class="secno">7. </span><span class="content"> Interaction Media Features</span><a class="self-link" href="#mf-interaction"></a></h2>
   <p class="note" role="note"><span>Note:</span> the <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover①">hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover①">any-hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer③">pointer</a>, and <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①">any-pointer</a> media features are at risk.</p>
   <p>The “interaction” media features reflect various aspects of how the user interacts with the page.</p>
   <div class="note" role="note">
     Typical examples of devices matching combinations of <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer④">pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover②">hover</a>: 
    <table class="data">
     <thead>
      <tr>
       <td>
       <th><a class="css" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer⑤">pointer: none</a> 
       <th><a class="css" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer⑥">pointer: coarse</a> 
       <th><a class="css" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer⑦">pointer: fine</a> 
     <tbody>
      <tr>
       <th scope="row"><a class="css" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover③">hover: none</a> 
       <td>keyboard-only controls, sequential/spatial (d-pad) focus navigation 
       <td>smartphones, touch screens 
       <td>basic stylus digitizers (Cintiq, Wacom, etc) 
      <tr>
       <th scope="row"><a class="css" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover④">hover: hover</a> 
       <td>
       <td>Nintendo Wii controller, Kinect 
       <td>mouse, touch pad, advanced stylus digitizers (Surface, Samsung Note, Wacom Intuos Pro, etc) 
    </table>
   </div>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer⑧">pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover⑤">hover</a> features relate to the characteristics of the “primary” pointing device,
	while <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer②">any-pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover②">any-hover</a> can be used to query the properties of all potentially available pointing devices.</p>
   <p class="note" role="note"><span>Note:</span> While this specification does not define how user agents should decide what the “primary” pointing device is,
	the expectation is that user agents should make this determination
	by combining knowledge about the device/environment they are running on,
	the number and type of pointing devices available,
	and a notion of which of these is generally and/or currently being used.
	In situations where the primary input mechanism for a device is not a pointing device,
	but there is a secondary – and less frequently used – input that is a pointing devices,
	the user agent may decide to treat the non-pointing device as the primary (resulting in 'pointer: none').
	user agents may also decide to dynamically change what type of pointing device is deemed to be primary,
	in response to changes in the user environment
	or in the way the user is interacting with the UA.</p>
   <p class="note" role="note"><span>Note:</span> The <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer⑨">pointer</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover⑥">hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer③">any-pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover③">any-hover</a> features only relate to the characteristics,
	or the complete absence, of pointing devices,
	and can not be used to detect the presence of non-pointing device input mechanisms such as keyboards.
	Authors should take into account the potential presence of non-pointing device inputs,
	regardless of which values are matched when querying these features.</p>
   <div class="note" role="note"> While <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①⓪">pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover⑦">hover</a> can be used to design the main style and interaction
		mode of the page to suit the primary input mechanism (based on the characteristics, or complete absence,
		of the primary pointing device), authors should strongly consider using <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer④">any-pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover④">any-hover</a> to take into account all possible types of pointing devices	that have been detected. </div>
   <h3 class="heading settled" data-level="7.1" id="pointer"><span class="secno">7.1. </span><span class="content"> Pointing Device Quality: the <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①①">pointer</a> feature</span><a class="self-link" href="#pointer"></a></h3>
   <p class="note" role="note"><span>Note:</span> This feature is at risk.</p>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-pointer">pointer</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①⑦">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①①">|</a> coarse <span id="ref-for-comb-one①②">|</span> fine 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①②">pointer</a> media feature is used to query the presence and accuracy of a pointing device such as a mouse.
	If multiple pointing devices are present,
	the <span class="property" id="ref-for-descdef-media-pointer①③">pointer</span> media feature must reflect the characteristics of the “primary” pointing device,
	as determined by the user agent.
	(To query the capabilities of <em>any</em> available pointing devices,
		see the <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer⑤">any-pointer</a> media feature.)</p>
   <dl>
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/pointer" data-dfn-type="value" data-export id="valdef-media-pointer-none">none</dfn> 
    <dd>The primary input mechanism of the device does not include a pointing device. 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/pointer" data-dfn-type="value" data-export id="valdef-media-pointer-coarse">coarse</dfn> 
    <dd>The primary input mechanism of the device includes a pointing device of limited accuracy.
			Examples include touchscreens and motion-detection sensors (like the Kinect peripheral for the Xbox.) 
    <dt><dfn class="dfn-paneled css" data-dfn-for="@media/pointer" data-dfn-type="value" data-export id="valdef-media-pointer-fine">fine</dfn> 
    <dd>The primary input mechanism of the device includes an accurate pointing device.
			Examples include mice, touchpads, and drawing styluses. 
   </dl>
   <p>Both <a class="css" data-link-type="maybe" href="#valdef-media-pointer-coarse" id="ref-for-valdef-media-pointer-coarse">coarse</a> and <a class="css" data-link-type="maybe" href="#valdef-media-pointer-fine" id="ref-for-valdef-media-pointer-fine">fine</a> indicate the presence of a pointing device,
	but differ in accuracy.
	A pointing device with which it would be difficult or impossible
	to reliably pick one of several small adjacent targets at a zoom factor of 1
	would qualify as <span class="css" id="ref-for-valdef-media-pointer-coarse①">coarse</span>.
	Changing the zoom level does not affect the value of this media feature.</p>
   <p class="note" role="note"><span>Note:</span> As the UA may provide the user with the ability to zoom,
	or as secondary pointing devices may have a different accuracy,
	the user may be able to perform accurate clicks even if the value of this media feature is <a class="css" data-link-type="maybe" href="#valdef-media-pointer-coarse" id="ref-for-valdef-media-pointer-coarse②">coarse</a>.
	This media feature does not indicate that the user will never be able to click accurately,
	only that it is inconvenient for them to do so.
	Authors are expected to react to a value of <span class="css" id="ref-for-valdef-media-pointer-coarse③">coarse</span> by designing pages that do not rely on accurate clicking to be operated.</p>
   <p>For accessibility reasons,
	even on devices whose pointing device can be described as <a class="css" data-link-type="maybe" href="#valdef-media-pointer-fine" id="ref-for-valdef-media-pointer-fine①">fine</a>,
	the UA may give a value of <a class="css" data-link-type="maybe" href="#valdef-media-pointer-coarse" id="ref-for-valdef-media-pointer-coarse④">coarse</a> or <a class="css" data-link-type="maybe" href="#valdef-media-pointer-none" id="ref-for-valdef-media-pointer-none①">none</a> to this media query,
	to indicate that the user has difficulties manipulating the pointing device accurately or at all.
	In addition, even if the primary pointing device has <span class="css" id="ref-for-valdef-media-pointer-fine②">fine</span> pointing accuracy,
	there may be additional <span class="css" id="ref-for-valdef-media-pointer-coarse⑤">coarse</span> pointing devices available to the user. Authors may
	wish to query the <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer⑥">any-pointer</a> media feature to take these other <span class="css" id="ref-for-valdef-media-pointer-coarse⑥">coarse</span> potential
	pointing devicess into account.</p>
   <div class="example" id="example-44af24a9">
    <a class="self-link" href="#example-44af24a9"></a> 
<pre>/* Make radio buttons and check boxes larger if we have an inaccurate primary pointing device */
@media (pointer:coarse) {
  input[type="checkbox"], input[type="radio"] {
    min-width:30px;
    min-height:40px;
    background:transparent;
  }
}
</pre>
   </div>
   <h3 class="heading settled" data-level="7.2" id="hover"><span class="secno">7.2. </span><span class="content"> Hover Capability: the <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover⑧">hover</a> feature</span><a class="self-link" href="#hover"></a></h3>
   <p class="note" role="note"><span>Note:</span> This feature is at risk.</p>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-hover">hover</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①⑧">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①③">|</a> hover 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover⑨">hover</a> media feature is used to query the user’s ability to hover over elements on the page
	with the primary pointing device.
	If a device has multiple pointing devices,
	the <span class="property" id="ref-for-descdef-media-hover①⓪">hover</span> media feature must reflect the characteristics of the “primary” pointing device,
	as determined by the user agent.
	(To query the capabilities of <em>any</em> available pointing devices,
		see the <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover⑤">any-hover</a> media feature.)</p>
   <dl>
    <dt><dfn class="css" data-dfn-for="@media/hover" data-dfn-type="value" data-export id="valdef-media-hover-none">none<a class="self-link" href="#valdef-media-hover-none"></a></dfn> 
    <dd>
      Indicates that the primary pointing device can’t hover,
			or that there is no pointing device.
			Examples include touchscreens and screens that use a basic drawing stylus. 
     <p>Pointing devices that can hover,
			but for which doing so is inconvenient and not part of the normal way they are used,
			also match this value.
			For example, a touchscreen where a long press is treated as hovering
			would match <a class="css" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover①①">hover: none</a>.</p>
    <dt><dfn class="css" data-dfn-for="@media/hover" data-dfn-type="value" data-export id="valdef-media-hover-hover">hover<a class="self-link" href="#valdef-media-hover-hover"></a></dfn> 
    <dd> Indicates that the primary pointing device can easily hover over parts of the page.
			Examples include mice and devices that physically point at the screen, like the Nintendo Wii controller. 
   </dl>
   <div class="example" id="example-3d419780">
    <a class="self-link" href="#example-3d419780"></a> For example, on a touch screen device that can also be controlled by an optional mouse,
		the <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover①②">hover</a> <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③②">media feature</a> should match <span class="css" id="ref-for-descdef-media-hover①③">hover: none</span>,
		as the primary pointing device (the touch screen) does not allow the user to hover. 
    <p>However, despite this, the optional mouse does allow users to hover.
		Authors should therefore be careful not to assume that the ':hover' pseudo class
		will never match on a device where 'hover:none' is true,
		but they should design layouts that do not depend on hovering to be fully usable.</p>
   </div>
   <p>For accessibility reasons, even on devices that do support hovering,
	the UA may give a value of <a class="css" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover①④">hover: none</a> to this media query,
	to opt into layouts that work well without hovering.
	Note that even if the primary input mechanism has 'hover: hover' capability,
	there may be additional input mechanisms available to the user that do not provide hover capabilities.</p>
   <div class="example" id="example-46b96c8f">
    <a class="self-link" href="#example-46b96c8f"></a> 
<pre>/* Only use a hover-activated drop down menu on devices that can conveniently hover. */
@media (hover) {
  .menu > li        {display:inline-block;}
  .menu ul          {display:none; position:absolute;}
  .menu li:hover ul {display:block; list-style:none; padding:0;}
  /* ... */
}
</pre>
   </div>
   <h3 class="heading settled" data-level="7.3" id="any-input"><span class="secno">7.3. </span><span class="content"> All Available Interaction Capabilities: the <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer⑦">any-pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover⑥">any-hover</a> features</span><a class="self-link" href="#any-input"></a></h3>
   <p class="note" role="note"><span>Note:</span> This feature is at risk.</p>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-any-pointer">any-pointer</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media①⑨">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①④">|</a> coarse <span id="ref-for-comb-one①⑤">|</span> fine 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-any-hover">any-hover</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media②⓪">@media</a> 
     <tr>
      <th>Value:
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①⑥">|</a> hover 
     <tr>
      <th>Type:
      <td>discrete 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer⑧">any-pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover⑦">any-hover</a> media features are identical to the <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①④">pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover①⑤">hover</a> media features,
	but they correspond to the union of capabilities of all the pointing devices available to the user.
	In the case of <span class="property" id="ref-for-descdef-media-any-pointer⑨">any-pointer</span>, more than one of the values can match,
	if different pointing devices have different characteristics.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①⓪">any-pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover⑧">any-hover</a> must only match <span class="css">none</span> if <em>all</em> of the pointing devices would match <a class="css" data-link-type="maybe" href="#valdef-media-pointer-none" id="ref-for-valdef-media-pointer-none②">none</a> for the corresponding query,
	or there are no pointing devices at all.</p>
   <div class="note" role="note"> <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①①">any-pointer</a> is used to query the presence and accuracy of pointing devices.
	It does not take into account any additional non-pointing device inputs,
	and can not be used to test for the presence of other input mechanisms,
	such as d-pads or keyboard-only controls,
	that don’t move an on-screen pointer.
	'any-pointer:none' will only evaluate to true if there are no pointing devices at all present. </div>
   <div class="example" id="example-acccb04d"><a class="self-link" href="#example-acccb04d"></a> On a traditional desktop environment with a mouse and keyboard,
	'any-pointer:none' will be false (due to the presence of the mouse),
	even though a non-pointer input (the keyboard) is also present. </div>
   <div class="note" role="note"> 'any-hover:none' will only evaluate to true if there are no pointing devices,
	or if all the pointing devices present lack hover capabilities.
	As such, it should be understood as a query to test if any hover-capable pointing devices are present,
	rather than whether or not any of the pointing devices is hover-incapable.
	The latter scenario can currently not be determined using <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover⑨">any-hover</a> or any other interaction media feature.
	Additionally, it does not take into account any non-pointing device inputs,
	such as d-pads or keyboard-only controls,
	which by their very nature are also not hover-capable. </div>
   <div class="example" id="example-3ebf158a"><a class="self-link" href="#example-3ebf158a"></a> On a touch-enabled laptop with a mouse and a touchscreen,
	'any-hover:none' will evaluate to false (due to the presence of the hover-capable mouse),
	even though a non-hover-capable pointing device (the touchscreen) is also present.
	It is currently not possible to provide different styles for cases where different pointing devices have different hover capabilities. </div>
   <div class="note" role="note"> Designing a page that relies on hovering or accurate pointing
	only because <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover①⓪">any-hover</a> or <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①②">any-pointer</a> indicate that at least one of the available
	input mechanisms has these capabilities	is likely to result in a poor experience.
	However, authors may use this information to inform their decision about the style and
	functionality they wish to provide based on any additional pointing devices that
	are available to the user. </div>
   <div class="example" id="example-45cc4e7d">
    <a class="self-link" href="#example-45cc4e7d"></a> A number of smart TVs come with a way to control an on-screen cursor,
		but it is often fairly basic controller which is difficult to operate accurately. 
    <p>A browser in such a smart TV would have <a class="css" data-link-type="maybe" href="#valdef-media-pointer-coarse" id="ref-for-valdef-media-pointer-coarse⑦">coarse</a> as the value of both <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①⑤">pointer</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①③">any-pointer</a>,
		allowing authors to provide a layout with large and easy to reach click targets.</p>
    <p>The user may also have paired a Bluetooth mouse with the TV,
		and occasionally use it for extra convenience,
		but this mouse is not the main way the TV is operated. <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①⑥">pointer</a> still matches <a class="css" data-link-type="maybe" href="#valdef-media-pointer-coarse" id="ref-for-valdef-media-pointer-coarse⑧">coarse</a>, while <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①④">any-pointer</a> now both matches <span class="css" id="ref-for-valdef-media-pointer-coarse⑨">coarse</span> and <a class="css" data-link-type="maybe" href="#valdef-media-pointer-fine" id="ref-for-valdef-media-pointer-fine③">fine</a>.</p>
    <p>Switching to small click targets based on the fact that <span class="css">(any-pointer: fine)</span> is now true
		would not be appropriate.
		It would not only surprise the user
		by providing an experience out of line with what they expect on a TV,
		but may also be quite inconvenient:
		the mouse, not being the primary way to control the TV, may be out of reach,
		hidden under one of the cushions on the sofa...</p>
    <p>By contrast, consider scrolling on the same TV.
		Scrollbars are difficult to manipulate without an accurate pointing device.
		Having prepared an alternative way to indicate that there is more content to be seen
		based on <span class="css">(pointer: coarse)</span> being true,
		an author may want to still show the scrollbars in addition if <span class="css">(any-pointer: fine)</span> is true,
		or to hide them altogether to reduce visual clutter if <span class="css">(any-pointer: fine)</span> is false.</p>
   </div>
   <h2 class="heading settled" data-level="8" id="mf-deprecated"><span class="secno">8. </span><span class="content"> Appendix A: Deprecated Media Features</span><a class="self-link" href="#mf-deprecated"></a></h2>
   <p>The following <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③③">media features</a> are <strong>deprecated</strong>. They
	are kept for backward compatibility, but are not appropriate for newly
	written style sheets. Authors must not use them. User agents must support them
	as specified. </p>
   <p class="note" role="note">To query for the size of the viewport (or the page box
	on page media), the <a class="property" data-link-type="propdesc" href="#descdef-media-width" id="ref-for-descdef-media-width⑧">width</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-height" id="ref-for-descdef-media-height⑤">height</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-aspect-ratio" id="ref-for-descdef-media-aspect-ratio②">aspect-ratio</a> <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③④">media features</a> should be used, rather than <a class="property" data-link-type="propdesc" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width">device-width</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-device-height" id="ref-for-descdef-media-device-height">device-height</a> and <a class="property" data-link-type="propdesc" href="#descdef-media-device-aspect-ratio" id="ref-for-descdef-media-device-aspect-ratio">device-aspect-ratio</a>, which refer to the physical size of the the device
	regardless of how much space is available for the document being laid out. The
	device-* <span id="ref-for-media-feature③⑤">media features</span> are also sometimes used as a proxy to detect
	mobile devices. Instead, authors should use <span id="ref-for-media-feature③⑥">media features</span> that better
	represent the aspect of the device that they are attempting to style against. </p>
   <h3 class="no-toc no-num heading settled" id="device-width"><span class="content"> device-width</span><a class="self-link" href="#device-width"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-device-width">device-width</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media②①">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value④" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width①">device-width</a> media feature describes the width of the rendering surface of the output device.
	For continuous media, this is the width of the <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#web-exposed-screen-area" id="ref-for-web-exposed-screen-area">Web-exposed screen area</a>.
	For paged media, this is the width of the page sheet size.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width②">device-width</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range⑥">false in the negative range</a>.</p>
   <div class="example" id="example-4b4397c6">
    <a class="self-link" href="#example-4b4397c6"></a> 
<pre>@media (device-width &lt; 800px) { … }</pre>
    <p>In the example above, the style sheet will apply only to screens
		less than <span class="css">800px</span> in length.
		The <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#px" id="ref-for-px①">px</a> unit is of the logical kind,
		as described in the <a href="#units">Units</a> section.</p>
   </div>
   <p class="note" role="note"><span>Note:</span> If a device can be used in multiple orientations,
	such as portrait and landscape,
	the <a class="property" data-link-type="propdesc">device-*</a> media features reflect the current orientation.</p>
   <h3 class="no-toc no-num heading settled" id="device-height"><span class="content"> device-height</span><a class="self-link" href="#device-height"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-device-height">device-height</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media②②">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" id="ref-for-length-value⑤" title="Expands to: em | vb | ch | cm | vh | vi | in | ex | vw | ic | pt | px | lh | pc | rem | rlh | vmax | advance measure | vmin | mm | cap | q">&lt;length></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#descdef-media-device-height" id="ref-for-descdef-media-device-height①">device-height</a> media feature describes the height of the rendering surface of the output device.
	For continuous media, this is the height of the <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#web-exposed-screen-area" id="ref-for-web-exposed-screen-area①">Web-exposed screen area</a>.
	For paged media, this is the height of the page sheet size.</p>
   <p><a class="property" data-link-type="propdesc" href="#descdef-media-device-height" id="ref-for-descdef-media-device-height②">device-height</a> is <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range⑦">false in the negative range</a>.</p>
   <div class="example" id="example-c05b0263">
    <a class="self-link" href="#example-c05b0263"></a> 
<pre>&lt;link rel="stylesheet" media="(device-height > 600px)" /></pre>
    <p>In the example above, the style sheet will apply only to screens
		taller than 600 vertical pixels.
		Note that the definition of the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-4/#px" id="ref-for-px②">px</a> unit is the same as in other parts of CSS.</p>
   </div>
   <h3 class="no-toc no-num heading settled" id="device-aspect-ratio"><span class="content"> device-aspect-ratio</span><a class="self-link" href="#device-aspect-ratio"></a></h3>
   <table class="def descdef mq">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-for="@media" data-dfn-type="descriptor" data-export id="descdef-media-device-aspect-ratio">device-aspect-ratio</dfn>
     <tr>
      <th>For:
      <td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media②③">@media</a> 
     <tr>
      <th>Value:
      <td class="prod"><a class="production css" data-link-type="type" href="#typedef-ratio" id="ref-for-typedef-ratio③">&lt;ratio></a> 
     <tr>
      <th>Type:
      <td>range 
   </table>
   <p>The 'device-aspect-ratio media feature is defined as the ratio of
	the value of the <a class="property" data-link-type="propdesc" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width③">device-width</a> media feature to
	the value of the 'device-height media feature.</p>
   <div class="example" id="example-b60c3a77">
    <a class="self-link" href="#example-b60c3a77"></a> For example, if a screen device with square pixels
		has 1280 horizontal pixels and 720 vertical pixels
		(commonly referred to as “16:9”),
		the following media queries will all match the device: 
<pre>@media (device-aspect-ratio: 16/9) { … }
@media (device-aspect-ratio: 32/18) { … }
@media (device-aspect-ratio: 1280/720) { … }
@media (device-aspect-ratio: 2560/1440) { … }
</pre>
   </div>
   <h2 class="no-num heading settled" id="changes"><span class="content"> Changes</span><a class="self-link" href="#changes"></a></h2>
   <h3 class="heading settled" id="changes-2017-9"><span class="content"> Changes since the 5 Septemper 2017 Candidate Recommendation</span><a class="self-link" href="#changes-2017-9"></a></h3>
    The following changes were made to this specification since the <a href="https://www.w3.org/TR/2017/CR-mediaqueries-4-20170905/">5 September 2017 Candidate Recommendation</a>: 
   <ul>
    <li>Clarify that the <a class="css" data-link-type="maybe" href="#valdef-media-speech" id="ref-for-valdef-media-speech③">speech</a> media type is for pure audio UAs, not screen readers,
	which as their name indicates, work based on a screen rendition. 
    <li>Add note referencing the syntax spec to remind that token parsing is ascii case insensitive 
    <li>Fix a bug in the grammar that accidentally allowed forms like (width 500px), without any comparison 
   </ul>
   <h3 class="heading settled" id="changes-2017"><span class="content"> Changes since the 19 May 2017 Working Draft</span><a class="self-link" href="#changes-2017"></a></h3>
    The following changes were made to this specification since the <a href="https://www.w3.org/TR/2017/WD-mediaqueries-4-20170519/">19 May 2017 Working Draft </a>: 
   <ul>
    <li>Changed range media features to be <a data-link-type="dfn" href="#false-in-the-negative-range" id="ref-for-false-in-the-negative-range⑧">false in the negative range</a> instead of failing to parse negative values. 
    <li>Included enough informaton about the color spaces needed by <a class="property" data-link-type="propdesc" href="#descdef-media-color-gamut" id="ref-for-descdef-media-color-gamut③">color-gamut</a> directly into the specification. 
   </ul>
   <h3 class="heading settled" id="changes-2012"><span class="content"> Changes Since Media Queries Level 3</span><a class="self-link" href="#changes-2012"></a></h3>
   <p>The following changes were made to this specification since the <a href="https://www.w3.org/TR/css3-mediaqueries/">19 June 2012 Recomendation of Media Queries Level 3</a>:</p>
   <ul>
    <li> Large editorial rewrite and reorgization of the document. 
    <li> <a href="#mq-boolean-context">Boolean-context</a> <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③⑦">media features</a> are now additionally false
		if they would be true for the keyword none. 
    <li> <a data-link-type="dfn" href="#media-feature" id="ref-for-media-feature③⑧">Media features</a> with numeric values can now be written in a <a href="#mq-range-context">range context</a>. 
    <li> The <a class="property" data-link-type="propdesc" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①⑦">pointer</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①⑤">any-pointer</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-hover" id="ref-for-descdef-media-hover①⑥">hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover①①">any-hover</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-update" id="ref-for-descdef-media-update③">update</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-color-gamut" id="ref-for-descdef-media-color-gamut④">color-gamut</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-block" id="ref-for-descdef-media-overflow-block②">overflow-block</a>,
		and <a class="property" data-link-type="propdesc" href="#descdef-media-overflow-inline" id="ref-for-descdef-media-overflow-inline③">overflow-inline</a> media features were added. 
    <li> <span class="css">or</span>, <span class="css">and</span>, <a class="css" data-link-type="maybe" href="#valdef-media-only" id="ref-for-valdef-media-only⑤">only</a> and <a class="css" data-link-type="maybe" href="#valdef-media-not" id="ref-for-valdef-media-not⑧">not</a> are disallowed from being recognized as media types,
		even invalid ones.
		(They’ll trigger a syntax error instead.) 
    <li> All media types except for <a class="css" data-link-type="maybe" href="#valdef-media-screen" id="ref-for-valdef-media-screen⑥">screen</a>, <a class="css" data-link-type="maybe" href="#valdef-media-print" id="ref-for-valdef-media-print①">print</a>, <a class="css" data-link-type="maybe" href="#valdef-media-speech" id="ref-for-valdef-media-speech④">speech</a>, and <a class="css" data-link-type="maybe" href="#valdef-media-all" id="ref-for-valdef-media-all">all</a> are deprecated. 
    <li> Deprecated <a class="property" data-link-type="propdesc" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width④">device-width</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-device-height" id="ref-for-descdef-media-device-height③">device-height</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-device-aspect-ratio" id="ref-for-descdef-media-device-aspect-ratio①">device-aspect-ratio</a>,
		and made them refer to the <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#web-exposed-screen-area" id="ref-for-web-exposed-screen-area②">Web-exposed screen area</a> instead of the screen for privacy and security reasons. 
    <li> Mediaqueries may depend on the evaluation of style sheets in some cases 
   </ul>
   <h2 class="no-num heading settled" id="acknowledgments"><span class="content"> Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2>
   <p>This specification is the product of the W3C Working Group on
Cascading Style Sheets.</p>
   <p>Comments from
 Arve Bersvendsen,
 Björn Höhrmann,
 Chris Lilley,
 Christoph Päper,
 L. David Baron,
 Elika J. Etemad,
 François Remy,
 Melinda Grant,
 Nicholas C. Zakas
 Patrick H. Lauke,
 Philipp Hoschka,
 Rick Byers,
 Rijk van Geijtenbeek,
 Roger Gimson,
 Sigurd Lerstad,
 Simon Kissane,
 Simon Pieters,
 Steven Pemberton,
 and Susan Lesch
improved this specification.</p>
   <h2 class="heading settled" data-level="9" id="priv-sec"><span class="secno">9. </span><span class="content">Privacy and Security Considerations</span><a class="self-link" href="#priv-sec"></a></h2>
   <p>This specification introduces no new security considerations.</p>
   <p>Media Queries enable CSS to query various aspects of the page’s environment,
including things that can be difficult or impossible to find via scripting.
This is potentially a privacy hazard,
allowing enhanced fingerprinting of a user,
but the risk is generally low.
At minimum, the same information should be <em>inferrable</em> via scripting by examining the User Agent string.
However, UA string spoofing does not affect Media Queries,
making this a somewhat more robust detection technique.</p>
   <p>That said, the information granted by Media Queries is relatively coarse,
and does not contribute much entropy in this regard.</p>
   <p>A few legacy Media Features (<a class="property" data-link-type="propdesc" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width⑤">device-width</a>, <a class="property" data-link-type="propdesc" href="#descdef-media-device-height" id="ref-for-descdef-media-device-height④">device-height</a>, and <a class="property" data-link-type="propdesc" href="#descdef-media-device-aspect-ratio" id="ref-for-descdef-media-device-aspect-ratio②">device-aspect-ratio</a>)
expose information about the environment in which the UA is running
without any clear benefit to doing so.
They are retained for compatibility reasons,
but for the sake of privacy and security,
UAs have been allowed to report inacurate information.</p>
   <p>The <a href="http://www.w3.org/2001/tag/">TAG</a> has developed a <a href="https://www.w3.org/TR/security-privacy-questionnaire/">self-review questionaire</a> to help editors and Working Groups evaluate the risks introduced by their specifications.
Answers are provided below.</p>
   <dl>
    <dt>Does this specification deal with personally-identifiable information? 
    <dd>No. 
    <dt>Does this specification deal with high-value data? 
    <dd>No. 
    <dt>Does this specification introduce new state for an origin that persists across browsing sessions? 
    <dd>No. 
    <dt>Does this specification expose persistent, cross-origin state to the web? 
    <dd>No. 
    <dt>Does this specification expose any other data to an origin that it doesn’t currently have access to? 
    <dd>No. 
    <dt>Does this specification enable new script execution/loading mechanisms? 
    <dd>No. 
    <dt>Does this specification allow an origin access to a user’s location? 
    <dd>No. 
    <dt>Does this specification allow an origin access to sensors on a user’s device? 
    <dd>No. 
    <dt>Does this specification allow an origin access to aspects of a user’s local computing environment? 
    <dd> Yes, as described in the prose above this questionaire. 
    <dt>Does this specification allow an origin access to other devices? 
    <dd>No. 
    <dt>Does this specification allow an origin some measure of control over a user agent’s native UI? 
    <dd>No. 
    <dt>Does this specification expose temporary identifiers to the web? 
    <dd>No. 
    <dt>Does this specification distinguish between behavior in first-party and third-party contexts? 
    <dd>No. 
    <dt>How should this specification work in the context of a user agent’s "incognito" mode? 
    <dd>No difference in behavior is needed. 
    <dt>Does this specification persist data to a user’s local device? 
    <dd>No. 
    <dt>Does this specification have a "Security Considerations" and "Privacy Considerations" section? 
    <dd>Yes, this is the section you are currently reading. 
    <dt>Does this specification allow downgrading default security characteristics? 
    <dd>No. 
   </dl>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <aside class="caniuse-status" data-deco data-dfn-id="resolution">
   <input class="caniuse-panel-btn" type="button" value="⋰">
   <p class="support"><b>Support:</b><span class="android yes"><span>Android Browser</span><span>4.4+</span></span><span class="baidu yes"><span>Baidu Browser</span><span>7.12+</span></span><span class="bb no"><span>Blackberry Browser</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>29+</span></span><span class="and_chr yes"><span>Chrome for Android</span><span>74+</span></span><span class="edge yes"><span>Edge</span><span>12+</span></span><span class="firefox yes"><span>Firefox</span><span>16+</span></span><span class="and_ff yes"><span>Firefox for Android</span><span>66+</span></span><span class="ie partial"><span><span>IE (limited)</span></span><span>9+</span></span><span class="ie_mob partial"><span><span>IE Mobile (limited)</span></span><span>10+</span></span><span class="kaios yes"><span>KaiOS Browser</span><span>2.5+</span></span><span class="opera yes"><span>Opera</span><span>12.1+</span></span><span class="op_mini partial"><span><span>Opera Mini (limited)</span></span><span>All</span></span><span class="op_mob yes"><span>Opera Mobile</span><span>12.1+</span></span><span class="and_qq yes"><span>QQ Browser</span><span>1.2+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="samsung yes"><span>Samsung Internet</span><span>4+</span></span><span class="and_uc yes"><span>UC Browser for Android</span><span>11.8+</span></span><span class="ios_saf no"><span>iOS Safari</span><span>None</span></span></p>
   <p class="caniuse">Source: <a href="https://caniuse.com/#feat=css-media-resolution">caniuse.com</a> as of 2019-06-04</p>
  </aside>
  <aside class="caniuse-status" data-deco data-dfn-id="mf-interaction">
   <input class="caniuse-panel-btn" type="button" value="⋰">
   <p class="support"><b>Support:</b><span class="android yes"><span>Android Browser</span><span>67+</span></span><span class="baidu yes"><span>Baidu Browser</span><span>7.12+</span></span><span class="bb no"><span>Blackberry Browser</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>41+</span></span><span class="and_chr yes"><span>Chrome for Android</span><span>74+</span></span><span class="edge yes"><span>Edge</span><span>12+</span></span><span class="firefox yes"><span>Firefox</span><span>64+</span></span><span class="and_ff yes"><span>Firefox for Android</span><span>66+</span></span><span class="ie no"><span>IE</span><span>None</span></span><span class="ie_mob no"><span>IE Mobile</span><span>None</span></span><span class="kaios no"><span>KaiOS Browser</span><span>None</span></span><span class="opera yes"><span>Opera</span><span>28+</span></span><span class="op_mini no"><span>Opera Mini</span><span>None</span></span><span class="op_mob yes"><span>Opera Mobile</span><span>46+</span></span><span class="and_qq no"><span>QQ Browser</span><span>None</span></span><span class="safari yes"><span>Safari</span><span>9+</span></span><span class="samsung yes"><span>Samsung Internet</span><span>5.0+</span></span><span class="and_uc yes"><span>UC Browser for Android</span><span>11.8+</span></span><span class="ios_saf yes"><span>iOS Safari</span><span>9.0+</span></span></p>
   <p class="caniuse">Source: <a href="https://caniuse.com/#feat=css-media-interaction">caniuse.com</a> as of 2019-06-04</p>
  </aside>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#valdef-media-all">all</a><span>, in §2.3</span>
   <li><a href="#descdef-media-any-hover">any-hover</a><span>, in §7.3</span>
   <li><a href="#descdef-media-any-pointer">any-pointer</a><span>, in §7.3</span>
   <li><a href="#descdef-media-aspect-ratio">aspect-ratio</a><span>, in §4.3</span>
   <li><a href="#valdef-media-aural">aural</a><span>, in §2.3</span>
   <li><a href="#boolean-context">boolean context</a><span>, in §2.4.2</span>
   <li><a href="#valdef-media-braille">braille</a><span>, in §2.3</span>
   <li><a href="#valdef-media-pointer-coarse">coarse</a><span>, in §7.1</span>
   <li><a href="#descdef-media-color">color</a><span>, in §6.1</span>
   <li><a href="#descdef-media-color-gamut">color-gamut</a><span>, in §6.4</span>
   <li><a href="#descdef-media-color-index">color-index</a><span>, in §6.2</span>
   <li><a href="#descdef-media-device-aspect-ratio">device-aspect-ratio</a><span>, in §8</span>
   <li><a href="#descdef-media-device-height">device-height</a><span>, in §8</span>
   <li><a href="#descdef-media-device-width">device-width</a><span>, in §8</span>
   <li><a href="#valdef-media-embossed">embossed</a><span>, in §2.3</span>
   <li><a href="#false-in-the-negative-range">false in the negative range</a><span>, in §2.4.3</span>
   <li><a href="#valdef-media-update-fast">fast</a><span>, in §5.4</span>
   <li><a href="#valdef-media-pointer-fine">fine</a><span>, in §7.1</span>
   <li><a href="#typedef-general-enclosed">&lt;general-enclosed></a><span>, in §3</span>
   <li><a href="#descdef-media-grid">grid</a><span>, in §5.3</span>
   <li><a href="#valdef-media-handheld">handheld</a><span>, in §2.3</span>
   <li><a href="#descdef-media-height">height</a><span>, in §4.2</span>
   <li>
    hover
    <ul>
     <li><a href="#descdef-media-hover">descriptor for @media</a><span>, in §7.2</span>
     <li><a href="#valdef-media-hover-hover">value for @media/hover</a><span>, in §7.2</span>
    </ul>
   <li><a href="#valdef-media-resolution-infinite">infinite</a><span>, in §5.1</span>
   <li><a href="#valdef-media-scan-interlace">interlace</a><span>, in §5.2</span>
   <li><a href="#valdef-media-orientation-landscape">landscape</a><span>, in §4.4</span>
   <li><a href="#typedef-media-and">&lt;media-and></a><span>, in §3</span>
   <li><a href="#typedef-media-condition">&lt;media-condition></a><span>, in §3</span>
   <li><a href="#media-condition">media condition</a><span>, in §2.5</span>
   <li><a href="#typedef-media-condition-without-or">&lt;media-condition-without-or></a><span>, in §3</span>
   <li><a href="#typedef-media-feature">&lt;media-feature></a><span>, in §3</span>
   <li><a href="#media-feature">media feature</a><span>, in §2.4</span>
   <li><a href="#typedef-media-in-parens">&lt;media-in-parens></a><span>, in §3</span>
   <li><a href="#typedef-media-not">&lt;media-not></a><span>, in §3</span>
   <li><a href="#typedef-media-or">&lt;media-or></a><span>, in §3</span>
   <li><a href="#media-query">media query</a><span>, in §2</span>
   <li><a href="#typedef-media-query">&lt;media-query></a><span>, in §3</span>
   <li><a href="#media-query-list">media query list</a><span>, in §2.1</span>
   <li><a href="#typedef-media-query-list">&lt;media-query-list></a><span>, in §3</span>
   <li><a href="#media-query-modifier">media query modifier</a><span>, in §2.2</span>
   <li><a href="#media-type">media type</a><span>, in §2.3</span>
   <li><a href="#typedef-media-type">&lt;media-type></a><span>, in §3</span>
   <li><a href="#typedef-mf-boolean">&lt;mf-boolean></a><span>, in §3</span>
   <li><a href="#typedef-mf-comparison">&lt;mf-comparison></a><span>, in §3</span>
   <li><a href="#typedef-mf-eq">&lt;mf-eq></a><span>, in §3</span>
   <li><a href="#typedef-mf-gt">&lt;mf-gt></a><span>, in §3</span>
   <li><a href="#typedef-mf-lt">&lt;mf-lt></a><span>, in §3</span>
   <li><a href="#typedef-mf-name">&lt;mf-name></a><span>, in §3</span>
   <li><a href="#typedef-mf-plain">&lt;mf-plain></a><span>, in §3</span>
   <li><a href="#typedef-mf-range">&lt;mf-range></a><span>, in §3</span>
   <li><a href="#typedef-mf-value">&lt;mf-value></a><span>, in §3</span>
   <li><a href="#descdef-media-monochrome">monochrome</a><span>, in §6.3</span>
   <li><a href="#typedef-mq-boolean">&lt;mq-boolean></a><span>, in §5.3</span>
   <li>
    none
    <ul>
     <li><a href="#valdef-media-hover-none">value for @media/hover</a><span>, in §7.2</span>
     <li><a href="#valdef-media-overflow-block-none">value for @media/overflow-block</a><span>, in §5.5</span>
     <li><a href="#valdef-media-overflow-inline-none">value for @media/overflow-inline</a><span>, in §5.6</span>
     <li><a href="#valdef-media-pointer-none">value for @media/pointer</a><span>, in §7.1</span>
     <li><a href="#valdef-media-update-none">value for @media/update</a><span>, in §5.4</span>
    </ul>
   <li><a href="#valdef-media-not">not</a><span>, in §2.2.1</span>
   <li><a href="#valdef-media-only">only</a><span>, in §2.2.2</span>
   <li><a href="#valdef-media-overflow-block-optional-paged">optional-paged</a><span>, in §5.5</span>
   <li><a href="#descdef-media-orientation">orientation</a><span>, in §4.4</span>
   <li><a href="#descdef-media-overflow-block">overflow-block</a><span>, in §5.5</span>
   <li><a href="#descdef-media-overflow-inline">overflow-inline</a><span>, in §5.6</span>
   <li><a href="#valdef-media-color-gamut-p3">p3</a><span>, in §6.4</span>
   <li><a href="#valdef-media-overflow-block-paged">paged</a><span>, in §5.5</span>
   <li><a href="#descdef-media-pointer">pointer</a><span>, in §7.1</span>
   <li><a href="#valdef-media-orientation-portrait">portrait</a><span>, in §4.4</span>
   <li><a href="#valdef-media-print">print</a><span>, in §2.3</span>
   <li><a href="#valdef-media-scan-progressive">progressive</a><span>, in §5.2</span>
   <li><a href="#valdef-media-projection">projection</a><span>, in §2.3</span>
   <li><a href="#range-context">range context</a><span>, in §2.4.3</span>
   <li><a href="#typedef-ratio">&lt;ratio></a><span>, in §4.3</span>
   <li><a href="#valdef-media-color-gamut-rec2020">rec2020</a><span>, in §6.4</span>
   <li><a href="#descdef-media-resolution">resolution</a><span>, in §5.1</span>
   <li><a href="#descdef-media-scan">scan</a><span>, in §5.2</span>
   <li><a href="#valdef-media-screen">screen</a><span>, in §2.3</span>
   <li>
    scroll
    <ul>
     <li><a href="#valdef-media-overflow-block-scroll">value for @media/overflow-block</a><span>, in §5.5</span>
     <li><a href="#valdef-media-overflow-inline-scroll">value for @media/overflow-inline</a><span>, in §5.6</span>
    </ul>
   <li><a href="#valdef-media-update-slow">slow</a><span>, in §5.4</span>
   <li><a href="#valdef-media-speech">speech</a><span>, in §2.3</span>
   <li><a href="#valdef-media-color-gamut-srgb">srgb</a><span>, in §6.4</span>
   <li><a href="#valdef-media-tty">tty</a><span>, in §2.3</span>
   <li><a href="#valdef-media-tv">tv</a><span>, in §2.3</span>
   <li><a href="#descdef-media-update">update</a><span>, in §5.4</span>
   <li><a href="#descdef-media-width">width</a><span>, in §4.1</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-propdef-break-inside">
   <a href="https://drafts.csswg.org/css-break-3/#propdef-break-inside">https://drafts.csswg.org/css-break-3/#propdef-break-inside</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-break-inside">5.5. 
Block-Axis Overflow: the overflow-block feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-at-ruledef-import">
   <a href="https://drafts.csswg.org/css-cascade-3/#at-ruledef-import">https://drafts.csswg.org/css-cascade-3/#at-ruledef-import</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-at-ruledef-import">1. 
Introduction</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-initial-value">
   <a href="https://drafts.csswg.org/css-cascade-4/#initial-value">https://drafts.csswg.org/css-cascade-4/#initial-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-initial-value">1.3. 
Units</a> <a href="#ref-for-initial-value①">(2)</a>
    <li><a href="#ref-for-initial-value②">4.1. 
Width: the width feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-at-ruledef-media">
   <a href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media">https://drafts.csswg.org/css-conditional-3/#at-ruledef-media</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-at-ruledef-media">1. 
Introduction</a>
    <li><a href="#ref-for-at-ruledef-media①">3.1. Evaluating Media Queries</a>
    <li><a href="#ref-for-at-ruledef-media②">3.2. 
Error Handling</a>
    <li><a href="#ref-for-at-ruledef-media③">4.1. 
Width: the width feature</a>
    <li><a href="#ref-for-at-ruledef-media④">4.2. 
Height: the height feature</a>
    <li><a href="#ref-for-at-ruledef-media⑤">4.3. 
Aspect-Ratio: the aspect-ratio feature</a>
    <li><a href="#ref-for-at-ruledef-media⑥">4.4. 
Orientation: the orientation feature</a>
    <li><a href="#ref-for-at-ruledef-media⑦">5.1. 
Display Resolution: the resolution feature</a>
    <li><a href="#ref-for-at-ruledef-media⑧">5.2. 
Display Type: the scan feature</a>
    <li><a href="#ref-for-at-ruledef-media⑨">5.3. 
Detecting Console Displays: the grid feature</a>
    <li><a href="#ref-for-at-ruledef-media①⓪">5.4. 
Display Update Frequency: the update feature</a>
    <li><a href="#ref-for-at-ruledef-media①①">5.5. 
Block-Axis Overflow: the overflow-block feature</a>
    <li><a href="#ref-for-at-ruledef-media①②">5.6. 
Inline-Axis Overflow: the overflow-inline feature</a>
    <li><a href="#ref-for-at-ruledef-media①③">6.1. 
Color Depth: the color feature</a>
    <li><a href="#ref-for-at-ruledef-media①④">6.2. 
Paletted Color Screens: the color-index feature</a>
    <li><a href="#ref-for-at-ruledef-media①⑤">6.3. 
Monochrome Screens: the monochrome feature</a>
    <li><a href="#ref-for-at-ruledef-media①⑥">6.4. 
Color Display Quality: the color-gamut feature</a>
    <li><a href="#ref-for-at-ruledef-media①⑦">7.1. 
Pointing Device Quality: the pointer feature</a>
    <li><a href="#ref-for-at-ruledef-media①⑧">7.2. 
Hover Capability: the hover feature</a>
    <li><a href="#ref-for-at-ruledef-media①⑨">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a> <a href="#ref-for-at-ruledef-media②⓪">(2)</a>
    <li><a href="#ref-for-at-ruledef-media②①"> device-width</a>
    <li><a href="#ref-for-at-ruledef-media②②"> device-height</a>
    <li><a href="#ref-for-at-ruledef-media②③"> device-aspect-ratio</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-at-ruledef-viewport">
   <a href="https://drafts.csswg.org/css-device-adapt-1/#at-ruledef-viewport">https://drafts.csswg.org/css-device-adapt-1/#at-ruledef-viewport</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-at-ruledef-viewport">2. 
Media Queries</a> <a href="#ref-for-at-ruledef-viewport①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-font-size">
   <a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size">https://drafts.csswg.org/css-fonts-3/#propdef-font-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-font-size">1.3. 
Units</a>
    <li><a href="#ref-for-propdef-font-size①">4.1. 
Width: the width feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-dimension">
   <a href="https://drafts.csswg.org/css-values-4/#typedef-dimension">https://drafts.csswg.org/css-values-4/#typedef-dimension</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-dimension">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
    <li><a href="#ref-for-typedef-dimension①">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-ident">
   <a href="https://drafts.csswg.org/css-values-4/#typedef-ident">https://drafts.csswg.org/css-values-4/#typedef-ident</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-ident">3. 
Syntax</a> <a href="#ref-for-typedef-ident①">(2)</a> <a href="#ref-for-typedef-ident②">(3)</a> <a href="#ref-for-typedef-ident③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-cm">
   <a href="https://drafts.csswg.org/css-values-4/#cm">https://drafts.csswg.org/css-values-4/#cm</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-cm">5.1. 
Display Resolution: the resolution feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-em">
   <a href="https://drafts.csswg.org/css-values-4/#em">https://drafts.csswg.org/css-values-4/#em</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-em">1.3. 
Units</a>
    <li><a href="#ref-for-em①">4.1. 
Width: the width feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-px">
   <a href="https://drafts.csswg.org/css-values-4/#px">https://drafts.csswg.org/css-values-4/#px</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-px">5.1. 
Display Resolution: the resolution feature</a>
    <li><a href="#ref-for-px①"> device-width</a>
    <li><a href="#ref-for-px②"> device-height</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-relative-length">
   <a href="https://drafts.csswg.org/css-values-4/#relative-length">https://drafts.csswg.org/css-values-4/#relative-length</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-relative-length">1.3. 
Units</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://drafts.csswg.org/css-values-4/#comb-one">https://drafts.csswg.org/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">4.4. 
Orientation: the orientation feature</a>
    <li><a href="#ref-for-comb-one①">5.1. 
Display Resolution: the resolution feature</a>
    <li><a href="#ref-for-comb-one②">5.2. 
Display Type: the scan feature</a>
    <li><a href="#ref-for-comb-one③">5.4. 
Display Update Frequency: the update feature</a> <a href="#ref-for-comb-one④">(2)</a>
    <li><a href="#ref-for-comb-one⑤">5.5. 
Block-Axis Overflow: the overflow-block feature</a> <a href="#ref-for-comb-one⑥">(2)</a> <a href="#ref-for-comb-one⑦">(3)</a>
    <li><a href="#ref-for-comb-one⑧">5.6. 
Inline-Axis Overflow: the overflow-inline feature</a>
    <li><a href="#ref-for-comb-one⑨">6.4. 
Color Display Quality: the color-gamut feature</a> <a href="#ref-for-comb-one①⓪">(2)</a>
    <li><a href="#ref-for-comb-one①①">7.1. 
Pointing Device Quality: the pointer feature</a> <a href="#ref-for-comb-one①②">(2)</a>
    <li><a href="#ref-for-comb-one①③">7.2. 
Hover Capability: the hover feature</a>
    <li><a href="#ref-for-comb-one①④">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a> <a href="#ref-for-comb-one①⑤">(2)</a> <a href="#ref-for-comb-one①⑥">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-block-axis">
   <a href="https://www.w3.org/TR/css-writing-modes-4/#block-axis">https://www.w3.org/TR/css-writing-modes-4/#block-axis</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-block-axis">5.5. 
Block-Axis Overflow: the overflow-block feature</a> <a href="#ref-for-block-axis①">(2)</a> <a href="#ref-for-block-axis②">(3)</a> <a href="#ref-for-block-axis③">(4)</a> <a href="#ref-for-block-axis④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-inline-axis">
   <a href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis">https://www.w3.org/TR/css-writing-modes-4/#inline-axis</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-inline-axis">5.6. 
Inline-Axis Overflow: the overflow-inline feature</a> <a href="#ref-for-inline-axis①">(2)</a> <a href="#ref-for-inline-axis②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-any-value">
   <a href="https://drafts.csswg.org/css-syntax-3/#typedef-any-value">https://drafts.csswg.org/css-syntax-3/#typedef-any-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-any-value">3. 
Syntax</a> <a href="#ref-for-typedef-any-value①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-delim-token">
   <a href="https://drafts.csswg.org/css-syntax-3/#typedef-delim-token">https://drafts.csswg.org/css-syntax-3/#typedef-delim-token</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-delim-token">3. 
Syntax</a> <a href="#ref-for-typedef-delim-token①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-typedef-function-token">
   <a href="https://drafts.csswg.org/css-syntax-3/#typedef-function-token">https://drafts.csswg.org/css-syntax-3/#typedef-function-token</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-function-token">3. 
Syntax</a> <a href="#ref-for-typedef-function-token①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-parse-a-comma-separated-list-of-component-values">
   <a href="https://drafts.csswg.org/css-syntax-3/#parse-a-comma-separated-list-of-component-values">https://drafts.csswg.org/css-syntax-3/#parse-a-comma-separated-list-of-component-values</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-parse-a-comma-separated-list-of-component-values">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-integer-value">
   <a href="https://drafts.csswg.org/css-values-3/#integer-value">https://drafts.csswg.org/css-values-3/#integer-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-integer-value">1.2. 
Values</a>
    <li><a href="#ref-for-integer-value①">4.3. 
Aspect-Ratio: the aspect-ratio feature</a> <a href="#ref-for-integer-value②">(2)</a> <a href="#ref-for-integer-value③">(3)</a> <a href="#ref-for-integer-value④">(4)</a>
    <li><a href="#ref-for-integer-value⑤">5.3. 
Detecting Console Displays: the grid feature</a>
    <li><a href="#ref-for-integer-value⑥">6.1. 
Color Depth: the color feature</a>
    <li><a href="#ref-for-integer-value⑦">6.2. 
Paletted Color Screens: the color-index feature</a>
    <li><a href="#ref-for-integer-value⑧">6.3. 
Monochrome Screens: the monochrome feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-length-value">
   <a href="https://drafts.csswg.org/css-values-3/#length-value">https://drafts.csswg.org/css-values-3/#length-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-length-value">4.1. 
Width: the width feature</a> <a href="#ref-for-length-value①">(2)</a>
    <li><a href="#ref-for-length-value②">4.2. 
Height: the height feature</a> <a href="#ref-for-length-value③">(2)</a>
    <li><a href="#ref-for-length-value④"> device-width</a>
    <li><a href="#ref-for-length-value⑤"> device-height</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-number-value">
   <a href="https://drafts.csswg.org/css-values-3/#number-value">https://drafts.csswg.org/css-values-3/#number-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-number-value">1.2. 
Values</a>
    <li><a href="#ref-for-number-value①">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-resolution-value">
   <a href="https://drafts.csswg.org/css-values-3/#resolution-value">https://drafts.csswg.org/css-values-3/#resolution-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-resolution-value">1.2. 
Values</a>
    <li><a href="#ref-for-resolution-value①">5.1. 
Display Resolution: the resolution feature</a> <a href="#ref-for-resolution-value②">(2)</a> <a href="#ref-for-resolution-value③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-in">
   <a href="https://drafts.csswg.org/css-values-3/#in">https://drafts.csswg.org/css-values-3/#in</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-in">5.1. 
Display Resolution: the resolution feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-page-zoom">
   <a href="https://drafts.csswg.org/cssom-view-1/#page-zoom">https://drafts.csswg.org/cssom-view-1/#page-zoom</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-page-zoom">5.1. 
Display Resolution: the resolution feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-pinch-zoom">
   <a href="https://drafts.csswg.org/cssom-view-1/#pinch-zoom">https://drafts.csswg.org/cssom-view-1/#pinch-zoom</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-pinch-zoom">5.1. 
Display Resolution: the resolution feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-web-exposed-screen-area">
   <a href="https://drafts.csswg.org/cssom-view-1/#web-exposed-screen-area">https://drafts.csswg.org/cssom-view-1/#web-exposed-screen-area</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-web-exposed-screen-area"> device-width</a>
    <li><a href="#ref-for-web-exposed-screen-area①"> device-height</a>
    <li><a href="#ref-for-web-exposed-screen-area②"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-ascii-case-insensitive">
   <a href="https://infra.spec.whatwg.org/#ascii-case-insensitive">https://infra.spec.whatwg.org/#ascii-case-insensitive</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-ascii-case-insensitive">3. 
Syntax</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-break-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-break-inside" style="color:initial">break-inside</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-cascade-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-at-ruledef-import" style="color:initial">@import</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-cascade-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-initial-value" style="color:initial">initial value</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-conditional-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-at-ruledef-media" style="color:initial">@media</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS-DEVICE-ADAPT]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-at-ruledef-viewport" style="color:initial">@viewport</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-fonts-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-font-size" style="color:initial">font-size</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-typedef-dimension" style="color:initial">&lt;dimension></span>
     <li><span class="dfn-paneled" id="term-for-typedef-ident" style="color:initial">&lt;ident></span>
     <li><span class="dfn-paneled" id="term-for-cm" style="color:initial">cm</span>
     <li><span class="dfn-paneled" id="term-for-em" style="color:initial">em</span>
     <li><span class="dfn-paneled" id="term-for-px" style="color:initial">px</span>
     <li><span class="dfn-paneled" id="term-for-relative-length" style="color:initial">relative length</span>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-writing-modes-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-block-axis" style="color:initial">block axis</span>
     <li><span class="dfn-paneled" id="term-for-inline-axis" style="color:initial">inline axis</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS3SYN]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-typedef-any-value" style="color:initial">&lt;any-value></span>
     <li><span class="dfn-paneled" id="term-for-typedef-delim-token" style="color:initial">&lt;delim-token></span>
     <li><span class="dfn-paneled" id="term-for-typedef-function-token" style="color:initial">&lt;function-token></span>
     <li><span class="dfn-paneled" id="term-for-parse-a-comma-separated-list-of-component-values" style="color:initial">parse a comma-separated list of component values</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS3VAL]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-integer-value" style="color:initial">&lt;integer></span>
     <li><span class="dfn-paneled" id="term-for-length-value" style="color:initial">&lt;length></span>
     <li><span class="dfn-paneled" id="term-for-number-value" style="color:initial">&lt;number></span>
     <li><span class="dfn-paneled" id="term-for-resolution-value" style="color:initial">&lt;resolution></span>
     <li><span class="dfn-paneled" id="term-for-in" style="color:initial">in</span>
    </ul>
   <li>
    <a data-link-type="biblio">[cssom-view-1]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-page-zoom" style="color:initial">page zoom</span>
     <li><span class="dfn-paneled" id="term-for-pinch-zoom" style="color:initial">pinch zoom</span>
     <li><span class="dfn-paneled" id="term-for-web-exposed-screen-area" style="color:initial">web-exposed screen area</span>
    </ul>
   <li>
    <a data-link-type="biblio">[INFRA]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-ascii-case-insensitive" style="color:initial">ascii case-insensitive</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-colorimetry">[COLORIMETRY]
   <dd><a href="http://www.cie.co.at/publ/abst/15-2004.html">Colorimetry, Third Edition. CIE 15:2004. ISBN 978-3-901906-33-6</a>. URL: <a href="http://www.cie.co.at/publ/abst/15-2004.html">http://www.cie.co.at/publ/abst/15-2004.html</a>
   <dt id="biblio-css-cascade-3">[CSS-CASCADE-3]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-3/">CSS Cascading and Inheritance Level 3</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-cascade-3/">https://www.w3.org/TR/css-cascade-3/</a>
   <dt id="biblio-css-cascade-4">[CSS-CASCADE-4]
   <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-4/">CSS Cascading and Inheritance Level 4</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-cascade-4/">https://www.w3.org/TR/css-cascade-4/</a>
   <dt id="biblio-css-conditional-3">[CSS-CONDITIONAL-3]
   <dd>CSS Conditional Rules Module Level 3 URL: <a href="https://www.w3.org/TR/css3-conditional/">https://www.w3.org/TR/css3-conditional/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4]
   <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-4/">CSS Writing Modes Level 4</a>. 24 May 2018. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-4/">https://www.w3.org/TR/css-writing-modes-4/</a>
   <dt id="biblio-css21">[CSS21]
   <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS2/">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS2/">https://www.w3.org/TR/CSS2/</a>
   <dt id="biblio-css3syn">[CSS3SYN]
   <dd>Tab Atkins Jr.; Simon Sapin. <a href="https://www.w3.org/TR/css-syntax-3/">CSS Syntax Module Level 3</a>. 20 February 2014. CR. URL: <a href="https://www.w3.org/TR/css-syntax-3/">https://www.w3.org/TR/css-syntax-3/</a>
   <dt id="biblio-css3val">[CSS3VAL]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/">CSS Values and Units Module Level 3</a>. 31 January 2019. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a>
   <dt id="biblio-cssom-view-1">[CSSOM-VIEW-1]
   <dd>Simon Pieters. <a href="https://www.w3.org/TR/cssom-view-1/">CSSOM View Module</a>. 17 March 2016. WD. URL: <a href="https://www.w3.org/TR/cssom-view-1/">https://www.w3.org/TR/cssom-view-1/</a>
   <dt id="biblio-mediaq">[MEDIAQ]
   <dd>Florian Rivoal; Tab Atkins Jr.. <a href="https://www.w3.org/TR/mediaqueries-4/">Media Queries Level 4</a>. 5 September 2017. CR. URL: <a href="https://www.w3.org/TR/mediaqueries-4/">https://www.w3.org/TR/mediaqueries-4/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-css-break-3">[CSS-BREAK-3]
   <dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-break-3/">CSS Fragmentation Module Level 3</a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/css-break-3/">https://www.w3.org/TR/css-break-3/</a>
   <dt id="biblio-css-device-adapt">[CSS-DEVICE-ADAPT]
   <dd>Rune Lillesveen; Florian Rivoal; Matt Rakow. <a href="https://www.w3.org/TR/css-device-adapt-1/">CSS Device Adaptation Module Level 1</a>. 29 March 2016. WD. URL: <a href="https://www.w3.org/TR/css-device-adapt-1/">https://www.w3.org/TR/css-device-adapt-1/</a>
   <dt id="biblio-css-fonts-3">[CSS-FONTS-3]
   <dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-3/">CSS Fonts Module Level 3</a>. 20 September 2018. REC. URL: <a href="https://www.w3.org/TR/css-fonts-3/">https://www.w3.org/TR/css-fonts-3/</a>
   <dt id="biblio-html401">[HTML401]
   <dd>Dave Raggett; Arnaud Le Hors; Ian Jacobs. <a href="https://www.w3.org/TR/html401/">HTML 4.01 Specification</a>. 27 March 2018. REC. URL: <a href="https://www.w3.org/TR/html401/">https://www.w3.org/TR/html401/</a>
   <dt id="biblio-infra">[INFRA]
   <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/">Infra Standard</a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a>
   <dt id="biblio-itu-r-bt-2020-2">[ITU-R-BT-2020-2]
   <dd><a href="https://www.itu.int/rec/R-REC-BT.2020/en">Parameter values for ultra-high definition television systems for production and international programme exchange</a>. October 2015. URL: <a href="https://www.itu.int/rec/R-REC-BT.2020/en">https://www.itu.int/rec/R-REC-BT.2020/en</a>
   <dt id="biblio-rfc2879">[RFC2879]
   <dd>G. Klyne; L. McIntyre. <a href="https://tools.ietf.org/html/rfc2879">Content Feature Schema for Internet Fax (V2)</a>. August 2000. Proposed Standard. URL: <a href="https://tools.ietf.org/html/rfc2879">https://tools.ietf.org/html/rfc2879</a>
   <dt id="biblio-smpte-eg-432-1-2010">[SMPTE-EG-432-1-2010]
   <dd><a href="http://ieeexplore.ieee.org/document/7289763/">SMPTE Engineering Guideline - Digital Source Processing — Color Processing for D-Cinema</a>. 2010. URL: <a href="http://ieeexplore.ieee.org/document/7289763/">http://ieeexplore.ieee.org/document/7289763/</a>
   <dt id="biblio-smpte-rp-431-2-2011">[SMPTE-RP-431-2-2011]
   <dd><a href="http://ieeexplore.ieee.org/document/7290729/">SMPTE Recommended Practice - D-Cinema Quality — Reference Projector and Environment</a>. 2011. URL: <a href="http://ieeexplore.ieee.org/document/7290729/">http://ieeexplore.ieee.org/document/7290729/</a>
   <dt id="biblio-srgb">[SRGB]
   <dd><a href="https://webstore.iec.ch/publication/6169">Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB</a>. URL: <a href="https://webstore.iec.ch/publication/6169">https://webstore.iec.ch/publication/6169</a>
   <dt id="biblio-xmlstyle">[XMLSTYLE]
   <dd>James Clark. <a href="https://www.w3.org/1999/06/REC-xml-stylesheet-19990629/">Associating Style Sheets with XML documents</a>. 29 June 1999. REC. URL: <a href="https://www.w3.org/1999/06/REC-xml-stylesheet-19990629/">https://www.w3.org/1999/06/REC-xml-stylesheet-19990629/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <p>No properties defined.</p>
  <h3 class="no-num no-ref heading settled" id="media-descriptor-table"><span class="content"><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media" id="ref-for-at-ruledef-media②④">@media</a> Descriptors</span><a class="self-link" href="#media-descriptor-table"></a></h3>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Type
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-any-hover" id="ref-for-descdef-media-any-hover①②">any-hover</a>
      <td>none | hover
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-any-pointer" id="ref-for-descdef-media-any-pointer①⑥">any-pointer</a>
      <td>none | coarse | fine
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-aspect-ratio" id="ref-for-descdef-media-aspect-ratio③">aspect-ratio</a>
      <td>&lt;ratio>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-color" id="ref-for-descdef-media-color⑦">color</a>
      <td>&lt;integer>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-color-gamut" id="ref-for-descdef-media-color-gamut⑤">color-gamut</a>
      <td>srgb | p3 | rec2020
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-color-index" id="ref-for-descdef-media-color-index③">color-index</a>
      <td>&lt;integer>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-device-aspect-ratio" id="ref-for-descdef-media-device-aspect-ratio③">device-aspect-ratio</a>
      <td>&lt;ratio>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-device-height" id="ref-for-descdef-media-device-height⑤">device-height</a>
      <td>&lt;length>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-device-width" id="ref-for-descdef-media-device-width⑥">device-width</a>
      <td>&lt;length>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-grid" id="ref-for-descdef-media-grid⑤">grid</a>
      <td>&lt;mq-boolean>
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-height" id="ref-for-descdef-media-height⑥">height</a>
      <td>&lt;length>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-hover" id="ref-for-descdef-media-hover①⑦">hover</a>
      <td>none | hover
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-monochrome" id="ref-for-descdef-media-monochrome③">monochrome</a>
      <td>&lt;integer>
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-orientation" id="ref-for-descdef-media-orientation④">orientation</a>
      <td>portrait | landscape
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-overflow-block" id="ref-for-descdef-media-overflow-block③">overflow-block</a>
      <td>none | scroll | optional-paged | paged
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-overflow-inline" id="ref-for-descdef-media-overflow-inline④">overflow-inline</a>
      <td>none | scroll
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-pointer" id="ref-for-descdef-media-pointer①⑧">pointer</a>
      <td>none | coarse | fine
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-resolution" id="ref-for-descdef-media-resolution⑤">resolution</a>
      <td>&lt;resolution> | infinite
      <td>
      <td>range
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-scan" id="ref-for-descdef-media-scan④">scan</a>
      <td>interlace | progressive
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-update" id="ref-for-descdef-media-update④">update</a>
      <td>none | slow | fast
      <td>
      <td>discrete
     <tr>
      <th scope="row"><a class="css" data-link-type="descriptor" href="#descdef-media-width" id="ref-for-descdef-media-width⑨">width</a>
      <td>&lt;length>
      <td>
      <td>range
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue"> Is there any such UA, and if so do they match this media type?
		If not, it should be deprecated. <a href="https://github.com/w3c/csswg-drafts/issues/1751">&lt;https://github.com/w3c/csswg-drafts/issues/1751></a><a href="#issue-5c3f70fa"> ↵ </a></div>
  </div>
  <aside class="dfn-panel" data-for="media-query">
   <b><a href="#media-query">#media-query</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-media-query①">1. 
Introduction</a>
    <li><a href="#ref-for-media-query②">2. 
Media Queries</a> <a href="#ref-for-media-query③">(2)</a> <a href="#ref-for-media-query④">(3)</a> <a href="#ref-for-media-query⑤">(4)</a> <a href="#ref-for-media-query⑥">(5)</a>
    <li><a href="#ref-for-media-query⑦">2.1. 
Combining Media Queries</a> <a href="#ref-for-media-query⑧">(2)</a> <a href="#ref-for-media-query⑨">(3)</a>
    <li><a href="#ref-for-media-query①⓪">2.2. 
Media Query Modifiers</a> <a href="#ref-for-media-query①①">(2)</a>
    <li><a href="#ref-for-media-query①②">2.2.1. 
Negating a Media Query: the not keyword</a> <a href="#ref-for-media-query①③">(2)</a>
    <li><a href="#ref-for-media-query①④">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a> <a href="#ref-for-media-query①⑤">(2)</a> <a href="#ref-for-media-query①⑥">(3)</a> <a href="#ref-for-media-query①⑦">(4)</a> <a href="#ref-for-media-query①⑧">(5)</a> <a href="#ref-for-media-query①⑨">(6)</a> <a href="#ref-for-media-query②⓪">(7)</a> <a href="#ref-for-media-query②①">(8)</a> <a href="#ref-for-media-query②②">(9)</a>
    <li><a href="#ref-for-media-query②③">2.3. 
Media Types</a>
    <li><a href="#ref-for-media-query②④">2.4.3. 
Evaluating Media Features in a Range Context</a>
    <li><a href="#ref-for-media-query②⑤">3.1. Evaluating Media Queries</a> <a href="#ref-for-media-query②⑥">(2)</a>
    <li><a href="#ref-for-media-query②⑦">3.2. 
Error Handling</a> <a href="#ref-for-media-query②⑧">(2)</a> <a href="#ref-for-media-query②⑨">(3)</a> <a href="#ref-for-media-query③⓪">(4)</a> <a href="#ref-for-media-query③①">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="media-query-list">
   <b><a href="#media-query-list">#media-query-list</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-media-query-list">2.1. 
Combining Media Queries</a> <a href="#ref-for-media-query-list①">(2)</a> <a href="#ref-for-media-query-list②">(3)</a>
    <li><a href="#ref-for-media-query-list③">3. 
Syntax</a>
    <li><a href="#ref-for-media-query-list④">3.2. 
Error Handling</a> <a href="#ref-for-media-query-list⑤">(2)</a> <a href="#ref-for-media-query-list⑥">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="media-query-modifier">
   <b><a href="#media-query-modifier">#media-query-modifier</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-media-query-modifier">2. 
Media Queries</a>
    <li><a href="#ref-for-media-query-modifier①">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-not">
   <b><a href="#valdef-media-not">#valdef-media-not</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-not">2.2.1. 
Negating a Media Query: the not keyword</a> <a href="#ref-for-valdef-media-not①">(2)</a>
    <li><a href="#ref-for-valdef-media-not②">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a>
    <li><a href="#ref-for-valdef-media-not③">2.5. Combining Media Features</a> <a href="#ref-for-valdef-media-not④">(2)</a>
    <li><a href="#ref-for-valdef-media-not⑤">3. 
Syntax</a> <a href="#ref-for-valdef-media-not⑥">(2)</a>
    <li><a href="#ref-for-valdef-media-not⑦">3.2. 
Error Handling</a>
    <li><a href="#ref-for-valdef-media-not⑧"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-only">
   <b><a href="#valdef-media-only">#valdef-media-only</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-only">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a> <a href="#ref-for-valdef-media-only①">(2)</a> <a href="#ref-for-valdef-media-only②">(3)</a> <a href="#ref-for-valdef-media-only③">(4)</a>
    <li><a href="#ref-for-valdef-media-only④">3. 
Syntax</a>
    <li><a href="#ref-for-valdef-media-only⑤"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="media-type">
   <b><a href="#media-type">#media-type</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-media-type">1. 
Introduction</a> <a href="#ref-for-media-type①">(2)</a>
    <li><a href="#ref-for-media-type②">2. 
Media Queries</a> <a href="#ref-for-media-type③">(2)</a>
    <li><a href="#ref-for-media-type④">2.1. 
Combining Media Queries</a> <a href="#ref-for-media-type⑤">(2)</a>
    <li><a href="#ref-for-media-type⑥">2.2.1. 
Negating a Media Query: the not keyword</a>
    <li><a href="#ref-for-media-type⑦">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a> <a href="#ref-for-media-type⑧">(2)</a> <a href="#ref-for-media-type⑨">(3)</a> <a href="#ref-for-media-type①⓪">(4)</a> <a href="#ref-for-media-type①①">(5)</a> <a href="#ref-for-media-type①②">(6)</a>
    <li><a href="#ref-for-media-type①③">2.3. 
Media Types</a> <a href="#ref-for-media-type①④">(2)</a> <a href="#ref-for-media-type①⑤">(3)</a> <a href="#ref-for-media-type①⑥">(4)</a> <a href="#ref-for-media-type①⑦">(5)</a> <a href="#ref-for-media-type①⑧">(6)</a> <a href="#ref-for-media-type①⑨">(7)</a>
    <li><a href="#ref-for-media-type②⓪">2.4. 
Media Features</a>
    <li><a href="#ref-for-media-type②①">3.2. 
Error Handling</a> <a href="#ref-for-media-type②②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-all">
   <b><a href="#valdef-media-all">#valdef-media-all</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-all"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-print">
   <b><a href="#valdef-media-print">#valdef-media-print</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-print">2.3. 
Media Types</a>
    <li><a href="#ref-for-valdef-media-print①"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-screen">
   <b><a href="#valdef-media-screen">#valdef-media-screen</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-screen">2. 
Media Queries</a>
    <li><a href="#ref-for-valdef-media-screen①">2.1. 
Combining Media Queries</a>
    <li><a href="#ref-for-valdef-media-screen②">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a> <a href="#ref-for-valdef-media-screen③">(2)</a>
    <li><a href="#ref-for-valdef-media-screen④">2.3. 
Media Types</a> <a href="#ref-for-valdef-media-screen⑤">(2)</a>
    <li><a href="#ref-for-valdef-media-screen⑥"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-speech">
   <b><a href="#valdef-media-speech">#valdef-media-speech</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-speech">2.3. 
Media Types</a>
    <li><a href="#ref-for-valdef-media-speech①">2.4. 
Media Features</a>
    <li><a href="#ref-for-valdef-media-speech②">3.2. 
Error Handling</a>
    <li><a href="#ref-for-valdef-media-speech③"> Changes since the 5 Septemper 2017 Candidate Recommendation</a>
    <li><a href="#ref-for-valdef-media-speech④"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-tty">
   <b><a href="#valdef-media-tty">#valdef-media-tty</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-tty">2.3. 
Media Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-tv">
   <b><a href="#valdef-media-tv">#valdef-media-tv</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-tv">2.3. 
Media Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-projection">
   <b><a href="#valdef-media-projection">#valdef-media-projection</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-projection">2.1. 
Combining Media Queries</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-handheld">
   <b><a href="#valdef-media-handheld">#valdef-media-handheld</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-handheld">2.3. 
Media Types</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="media-feature">
   <b><a href="#media-feature">#media-feature</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-media-feature">2. 
Media Queries</a>
    <li><a href="#ref-for-media-feature①">2.2.2. 
Hiding a Media Query From Legacy User Agents: the only keyword</a> <a href="#ref-for-media-feature②">(2)</a> <a href="#ref-for-media-feature③">(3)</a>
    <li><a href="#ref-for-media-feature④">2.3. 
Media Types</a> <a href="#ref-for-media-feature⑤">(2)</a> <a href="#ref-for-media-feature⑥">(3)</a>
    <li><a href="#ref-for-media-feature⑦">2.4. 
Media Features</a> <a href="#ref-for-media-feature⑧">(2)</a> <a href="#ref-for-media-feature⑨">(3)</a> <a href="#ref-for-media-feature①⓪">(4)</a> <a href="#ref-for-media-feature①①">(5)</a> <a href="#ref-for-media-feature①②">(6)</a>
    <li><a href="#ref-for-media-feature①③">2.4.1. 
Media Feature Types: “range” and “discrete”</a> <a href="#ref-for-media-feature①④">(2)</a> <a href="#ref-for-media-feature①⑤">(3)</a>
    <li><a href="#ref-for-media-feature①⑥">2.4.2. 
Evaluating Media Features in a Boolean Context</a> <a href="#ref-for-media-feature①⑦">(2)</a> <a href="#ref-for-media-feature①⑧">(3)</a> <a href="#ref-for-media-feature①⑨">(4)</a> <a href="#ref-for-media-feature②⓪">(5)</a> <a href="#ref-for-media-feature②①">(6)</a>
    <li><a href="#ref-for-media-feature②②">2.4.3. 
Evaluating Media Features in a Range Context</a>
    <li><a href="#ref-for-media-feature②③">2.4.4. 
Using “min-” and “max-” Prefixes On Range Features</a> <a href="#ref-for-media-feature②④">(2)</a> <a href="#ref-for-media-feature②⑤">(3)</a> <a href="#ref-for-media-feature②⑥">(4)</a> <a href="#ref-for-media-feature②⑦">(5)</a> <a href="#ref-for-media-feature②⑧">(6)</a>
    <li><a href="#ref-for-media-feature②⑨">2.5. Combining Media Features</a>
    <li><a href="#ref-for-media-feature③⓪">3.2. 
Error Handling</a> <a href="#ref-for-media-feature③①">(2)</a>
    <li><a href="#ref-for-media-feature③②">7.2. 
Hover Capability: the hover feature</a>
    <li><a href="#ref-for-media-feature③③">8. 
Appendix A: Deprecated Media Features</a> <a href="#ref-for-media-feature③④">(2)</a> <a href="#ref-for-media-feature③⑤">(3)</a> <a href="#ref-for-media-feature③⑥">(4)</a>
    <li><a href="#ref-for-media-feature③⑦"> Changes Since Media Queries Level 3</a> <a href="#ref-for-media-feature③⑧">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="boolean-context">
   <b><a href="#boolean-context">#boolean-context</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-boolean-context">2.4. 
Media Features</a>
    <li><a href="#ref-for-boolean-context①">2.4.2. 
Evaluating Media Features in a Boolean Context</a> <a href="#ref-for-boolean-context②">(2)</a>
    <li><a href="#ref-for-boolean-context③">2.4.4. 
Using “min-” and “max-” Prefixes On Range Features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="range-context">
   <b><a href="#range-context">#range-context</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-range-context">2.4. 
Media Features</a>
    <li><a href="#ref-for-range-context①">2.4.1. 
Media Feature Types: “range” and “discrete”</a>
    <li><a href="#ref-for-range-context②">2.4.4. 
Using “min-” and “max-” Prefixes On Range Features</a> <a href="#ref-for-range-context③">(2)</a>
    <li><a href="#ref-for-range-context④">5.1. 
Display Resolution: the resolution feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="false-in-the-negative-range">
   <b><a href="#false-in-the-negative-range">#false-in-the-negative-range</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-false-in-the-negative-range">4.1. 
Width: the width feature</a>
    <li><a href="#ref-for-false-in-the-negative-range①">4.2. 
Height: the height feature</a>
    <li><a href="#ref-for-false-in-the-negative-range②">5.1. 
Display Resolution: the resolution feature</a>
    <li><a href="#ref-for-false-in-the-negative-range③">6.1. 
Color Depth: the color feature</a>
    <li><a href="#ref-for-false-in-the-negative-range④">6.2. 
Paletted Color Screens: the color-index feature</a>
    <li><a href="#ref-for-false-in-the-negative-range⑤">6.3. 
Monochrome Screens: the monochrome feature</a>
    <li><a href="#ref-for-false-in-the-negative-range⑥"> device-width</a>
    <li><a href="#ref-for-false-in-the-negative-range⑦"> device-height</a>
    <li><a href="#ref-for-false-in-the-negative-range⑧"> Changes since the 19 May 2017 Working Draft</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="media-condition">
   <b><a href="#media-condition">#media-condition</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-media-condition">2. 
Media Queries</a>
    <li><a href="#ref-for-media-condition①">2.5. Combining Media Features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-query-list">
   <b><a href="#typedef-media-query-list">#typedef-media-query-list</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-query-list">3. 
Syntax</a> <a href="#ref-for-typedef-media-query-list①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-query">
   <b><a href="#typedef-media-query">#typedef-media-query</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-query">3. 
Syntax</a> <a href="#ref-for-typedef-media-query①">(2)</a>
    <li><a href="#ref-for-typedef-media-query②">3.2. 
Error Handling</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-type">
   <b><a href="#typedef-media-type">#typedef-media-type</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-type">3. 
Syntax</a> <a href="#ref-for-typedef-media-type①">(2)</a>
    <li><a href="#ref-for-typedef-media-type②">3.2. 
Error Handling</a> <a href="#ref-for-typedef-media-type③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-condition">
   <b><a href="#typedef-media-condition">#typedef-media-condition</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-condition">3. 
Syntax</a> <a href="#ref-for-typedef-media-condition①">(2)</a>
    <li><a href="#ref-for-typedef-media-condition②">3.1. Evaluating Media Queries</a> <a href="#ref-for-typedef-media-condition③">(2)</a> <a href="#ref-for-typedef-media-condition④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-condition-without-or">
   <b><a href="#typedef-media-condition-without-or">#typedef-media-condition-without-or</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-condition-without-or">3. 
Syntax</a>
    <li><a href="#ref-for-typedef-media-condition-without-or①">3.1. Evaluating Media Queries</a> <a href="#ref-for-typedef-media-condition-without-or②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-not">
   <b><a href="#typedef-media-not">#typedef-media-not</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-not">3. 
Syntax</a> <a href="#ref-for-typedef-media-not①">(2)</a>
    <li><a href="#ref-for-typedef-media-not②">3.1. Evaluating Media Queries</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-and">
   <b><a href="#typedef-media-and">#typedef-media-and</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-and">3. 
Syntax</a> <a href="#ref-for-typedef-media-and①">(2)</a>
    <li><a href="#ref-for-typedef-media-and②">3.1. Evaluating Media Queries</a> <a href="#ref-for-typedef-media-and③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-or">
   <b><a href="#typedef-media-or">#typedef-media-or</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-or">3. 
Syntax</a>
    <li><a href="#ref-for-typedef-media-or①">3.1. Evaluating Media Queries</a> <a href="#ref-for-typedef-media-or②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-in-parens">
   <b><a href="#typedef-media-in-parens">#typedef-media-in-parens</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-in-parens">3. 
Syntax</a> <a href="#ref-for-typedef-media-in-parens①">(2)</a> <a href="#ref-for-typedef-media-in-parens②">(3)</a> <a href="#ref-for-typedef-media-in-parens③">(4)</a> <a href="#ref-for-typedef-media-in-parens④">(5)</a> <a href="#ref-for-typedef-media-in-parens⑤">(6)</a>
    <li><a href="#ref-for-typedef-media-in-parens⑥">3.1. Evaluating Media Queries</a> <a href="#ref-for-typedef-media-in-parens⑦">(2)</a> <a href="#ref-for-typedef-media-in-parens⑧">(3)</a> <a href="#ref-for-typedef-media-in-parens⑨">(4)</a> <a href="#ref-for-typedef-media-in-parens①⓪">(5)</a> <a href="#ref-for-typedef-media-in-parens①①">(6)</a> <a href="#ref-for-typedef-media-in-parens①②">(7)</a> <a href="#ref-for-typedef-media-in-parens①③">(8)</a> <a href="#ref-for-typedef-media-in-parens①④">(9)</a> <a href="#ref-for-typedef-media-in-parens①⑤">(10)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-media-feature">
   <b><a href="#typedef-media-feature">#typedef-media-feature</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-media-feature">3. 
Syntax</a>
    <li><a href="#ref-for-typedef-media-feature①">3.1. Evaluating Media Queries</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-plain">
   <b><a href="#typedef-mf-plain">#typedef-mf-plain</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-plain">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-boolean">
   <b><a href="#typedef-mf-boolean">#typedef-mf-boolean</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-boolean">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-range">
   <b><a href="#typedef-mf-range">#typedef-mf-range</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-range">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-name">
   <b><a href="#typedef-mf-name">#typedef-mf-name</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-name">3. 
Syntax</a> <a href="#ref-for-typedef-mf-name①">(2)</a> <a href="#ref-for-typedef-mf-name②">(3)</a> <a href="#ref-for-typedef-mf-name③">(4)</a> <a href="#ref-for-typedef-mf-name④">(5)</a> <a href="#ref-for-typedef-mf-name⑤">(6)</a>
    <li><a href="#ref-for-typedef-mf-name⑥">3.2. 
Error Handling</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-value">
   <b><a href="#typedef-mf-value">#typedef-mf-value</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-value">3. 
Syntax</a> <a href="#ref-for-typedef-mf-value①">(2)</a> <a href="#ref-for-typedef-mf-value②">(3)</a> <a href="#ref-for-typedef-mf-value③">(4)</a> <a href="#ref-for-typedef-mf-value④">(5)</a> <a href="#ref-for-typedef-mf-value⑤">(6)</a> <a href="#ref-for-typedef-mf-value⑥">(7)</a>
    <li><a href="#ref-for-typedef-mf-value⑦">3.2. 
Error Handling</a> <a href="#ref-for-typedef-mf-value⑧">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-lt">
   <b><a href="#typedef-mf-lt">#typedef-mf-lt</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-lt">3. 
Syntax</a> <a href="#ref-for-typedef-mf-lt①">(2)</a> <a href="#ref-for-typedef-mf-lt②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-gt">
   <b><a href="#typedef-mf-gt">#typedef-mf-gt</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-gt">3. 
Syntax</a> <a href="#ref-for-typedef-mf-gt①">(2)</a> <a href="#ref-for-typedef-mf-gt②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-eq">
   <b><a href="#typedef-mf-eq">#typedef-mf-eq</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-eq">3. 
Syntax</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mf-comparison">
   <b><a href="#typedef-mf-comparison">#typedef-mf-comparison</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mf-comparison">3. 
Syntax</a> <a href="#ref-for-typedef-mf-comparison①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-general-enclosed">
   <b><a href="#typedef-general-enclosed">#typedef-general-enclosed</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-general-enclosed">3. 
Syntax</a> <a href="#ref-for-typedef-general-enclosed①">(2)</a> <a href="#ref-for-typedef-general-enclosed②">(3)</a>
    <li><a href="#ref-for-typedef-general-enclosed③">3.1. Evaluating Media Queries</a> <a href="#ref-for-typedef-general-enclosed④">(2)</a> <a href="#ref-for-typedef-general-enclosed⑤">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-width">
   <b><a href="#descdef-media-width">#descdef-media-width</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-width">2.4.1. 
Media Feature Types: “range” and “discrete”</a>
    <li><a href="#ref-for-descdef-media-width①">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
    <li><a href="#ref-for-descdef-media-width②">2.4.3. 
Evaluating Media Features in a Range Context</a>
    <li><a href="#ref-for-descdef-media-width③">4.1. 
Width: the width feature</a> <a href="#ref-for-descdef-media-width④">(2)</a> <a href="#ref-for-descdef-media-width⑤">(3)</a>
    <li><a href="#ref-for-descdef-media-width⑥">4.3. 
Aspect-Ratio: the aspect-ratio feature</a>
    <li><a href="#ref-for-descdef-media-width⑦">4.4. 
Orientation: the orientation feature</a>
    <li><a href="#ref-for-descdef-media-width⑧">8. 
Appendix A: Deprecated Media Features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-height">
   <b><a href="#descdef-media-height">#descdef-media-height</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-height">4.2. 
Height: the height feature</a> <a href="#ref-for-descdef-media-height①">(2)</a> <a href="#ref-for-descdef-media-height②">(3)</a>
    <li><a href="#ref-for-descdef-media-height③">4.3. 
Aspect-Ratio: the aspect-ratio feature</a>
    <li><a href="#ref-for-descdef-media-height④">4.4. 
Orientation: the orientation feature</a>
    <li><a href="#ref-for-descdef-media-height⑤">8. 
Appendix A: Deprecated Media Features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-aspect-ratio">
   <b><a href="#descdef-media-aspect-ratio">#descdef-media-aspect-ratio</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-aspect-ratio">4.3. 
Aspect-Ratio: the aspect-ratio feature</a> <a href="#ref-for-descdef-media-aspect-ratio①">(2)</a>
    <li><a href="#ref-for-descdef-media-aspect-ratio②">8. 
Appendix A: Deprecated Media Features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-ratio">
   <b><a href="#typedef-ratio">#typedef-ratio</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-ratio">3. 
Syntax</a>
    <li><a href="#ref-for-typedef-ratio①">4.3. 
Aspect-Ratio: the aspect-ratio feature</a> <a href="#ref-for-typedef-ratio②">(2)</a>
    <li><a href="#ref-for-typedef-ratio③"> device-aspect-ratio</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-orientation">
   <b><a href="#descdef-media-orientation">#descdef-media-orientation</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-orientation">3.2. 
Error Handling</a>
    <li><a href="#ref-for-descdef-media-orientation①">4.4. 
Orientation: the orientation feature</a> <a href="#ref-for-descdef-media-orientation②">(2)</a> <a href="#ref-for-descdef-media-orientation③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-orientation-portrait">
   <b><a href="#valdef-media-orientation-portrait">#valdef-media-orientation-portrait</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-orientation-portrait">4.4. 
Orientation: the orientation feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-orientation-landscape">
   <b><a href="#valdef-media-orientation-landscape">#valdef-media-orientation-landscape</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-orientation-landscape">4.4. 
Orientation: the orientation feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-resolution">
   <b><a href="#descdef-media-resolution">#descdef-media-resolution</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-resolution">2.4.3. 
Evaluating Media Features in a Range Context</a>
    <li><a href="#ref-for-descdef-media-resolution①">5.1. 
Display Resolution: the resolution feature</a> <a href="#ref-for-descdef-media-resolution②">(2)</a> <a href="#ref-for-descdef-media-resolution③">(3)</a> <a href="#ref-for-descdef-media-resolution④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-resolution-infinite">
   <b><a href="#valdef-media-resolution-infinite">#valdef-media-resolution-infinite</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-resolution-infinite">5.1. 
Display Resolution: the resolution feature</a> <a href="#ref-for-valdef-media-resolution-infinite①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-scan">
   <b><a href="#descdef-media-scan">#descdef-media-scan</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-scan">2.3. 
Media Types</a>
    <li><a href="#ref-for-descdef-media-scan①">5.2. 
Display Type: the scan feature</a> <a href="#ref-for-descdef-media-scan②">(2)</a> <a href="#ref-for-descdef-media-scan③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-grid">
   <b><a href="#descdef-media-grid">#descdef-media-grid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-grid">2.3. 
Media Types</a>
    <li><a href="#ref-for-descdef-media-grid①">2.4.4. 
Using “min-” and “max-” Prefixes On Range Features</a> <a href="#ref-for-descdef-media-grid②">(2)</a>
    <li><a href="#ref-for-descdef-media-grid③">5.3. 
Detecting Console Displays: the grid feature</a> <a href="#ref-for-descdef-media-grid④">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="typedef-mq-boolean">
   <b><a href="#typedef-mq-boolean">#typedef-mq-boolean</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-typedef-mq-boolean">5.3. 
Detecting Console Displays: the grid feature</a> <a href="#ref-for-typedef-mq-boolean①">(2)</a> <a href="#ref-for-typedef-mq-boolean②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-update">
   <b><a href="#descdef-media-update">#descdef-media-update</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-update">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
    <li><a href="#ref-for-descdef-media-update①">5.4. 
Display Update Frequency: the update feature</a> <a href="#ref-for-descdef-media-update②">(2)</a>
    <li><a href="#ref-for-descdef-media-update③"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-update-none">
   <b><a href="#valdef-media-update-none">#valdef-media-update-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-update-none">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-overflow-block">
   <b><a href="#descdef-media-overflow-block">#descdef-media-overflow-block</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-overflow-block">5.5. 
Block-Axis Overflow: the overflow-block feature</a> <a href="#ref-for-descdef-media-overflow-block①">(2)</a>
    <li><a href="#ref-for-descdef-media-overflow-block②"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-overflow-block-paged">
   <b><a href="#valdef-media-overflow-block-paged">#valdef-media-overflow-block-paged</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-overflow-block-paged">5.6. 
Inline-Axis Overflow: the overflow-inline feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-overflow-inline">
   <b><a href="#descdef-media-overflow-inline">#descdef-media-overflow-inline</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-overflow-inline">5.6. 
Inline-Axis Overflow: the overflow-inline feature</a> <a href="#ref-for-descdef-media-overflow-inline①">(2)</a> <a href="#ref-for-descdef-media-overflow-inline②">(3)</a>
    <li><a href="#ref-for-descdef-media-overflow-inline③"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-color">
   <b><a href="#descdef-media-color">#descdef-media-color</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-color">2.4. 
Media Features</a>
    <li><a href="#ref-for-descdef-media-color①">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
    <li><a href="#ref-for-descdef-media-color②">3.2. 
Error Handling</a>
    <li><a href="#ref-for-descdef-media-color③">6.1. 
Color Depth: the color feature</a> <a href="#ref-for-descdef-media-color④">(2)</a> <a href="#ref-for-descdef-media-color⑤">(3)</a> <a href="#ref-for-descdef-media-color⑥">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-color-index">
   <b><a href="#descdef-media-color-index">#descdef-media-color-index</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-color-index">6.2. 
Paletted Color Screens: the color-index feature</a> <a href="#ref-for-descdef-media-color-index①">(2)</a> <a href="#ref-for-descdef-media-color-index②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-monochrome">
   <b><a href="#descdef-media-monochrome">#descdef-media-monochrome</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-monochrome">6.3. 
Monochrome Screens: the monochrome feature</a> <a href="#ref-for-descdef-media-monochrome①">(2)</a> <a href="#ref-for-descdef-media-monochrome②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-color-gamut">
   <b><a href="#descdef-media-color-gamut">#descdef-media-color-gamut</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-color-gamut">6.1. 
Color Depth: the color feature</a>
    <li><a href="#ref-for-descdef-media-color-gamut①">6.4. 
Color Display Quality: the color-gamut feature</a> <a href="#ref-for-descdef-media-color-gamut②">(2)</a>
    <li><a href="#ref-for-descdef-media-color-gamut③"> Changes since the 19 May 2017 Working Draft</a>
    <li><a href="#ref-for-descdef-media-color-gamut④"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-color-gamut-srgb">
   <b><a href="#valdef-media-color-gamut-srgb">#valdef-media-color-gamut-srgb</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-color-gamut-srgb">6.4. 
Color Display Quality: the color-gamut feature</a> <a href="#ref-for-valdef-media-color-gamut-srgb①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-color-gamut-p3">
   <b><a href="#valdef-media-color-gamut-p3">#valdef-media-color-gamut-p3</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-color-gamut-p3">6.4. 
Color Display Quality: the color-gamut feature</a> <a href="#ref-for-valdef-media-color-gamut-p3①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-color-gamut-rec2020">
   <b><a href="#valdef-media-color-gamut-rec2020">#valdef-media-color-gamut-rec2020</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-color-gamut-rec2020">6.4. 
Color Display Quality: the color-gamut feature</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-pointer">
   <b><a href="#descdef-media-pointer">#descdef-media-pointer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-pointer①">2.4.1. 
Media Feature Types: “range” and “discrete”</a>
    <li><a href="#ref-for-descdef-media-pointer②">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
    <li><a href="#ref-for-descdef-media-pointer③">7. 
Interaction Media Features</a> <a href="#ref-for-descdef-media-pointer④">(2)</a> <a href="#ref-for-descdef-media-pointer⑤">(3)</a> <a href="#ref-for-descdef-media-pointer⑥">(4)</a> <a href="#ref-for-descdef-media-pointer⑦">(5)</a> <a href="#ref-for-descdef-media-pointer⑧">(6)</a> <a href="#ref-for-descdef-media-pointer⑨">(7)</a> <a href="#ref-for-descdef-media-pointer①⓪">(8)</a>
    <li><a href="#ref-for-descdef-media-pointer①①">7.1. 
Pointing Device Quality: the pointer feature</a> <a href="#ref-for-descdef-media-pointer①②">(2)</a> <a href="#ref-for-descdef-media-pointer①③">(3)</a>
    <li><a href="#ref-for-descdef-media-pointer①④">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a> <a href="#ref-for-descdef-media-pointer①⑤">(2)</a> <a href="#ref-for-descdef-media-pointer①⑥">(3)</a>
    <li><a href="#ref-for-descdef-media-pointer①⑦"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-pointer-none">
   <b><a href="#valdef-media-pointer-none">#valdef-media-pointer-none</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-pointer-none">2.4.2. 
Evaluating Media Features in a Boolean Context</a>
    <li><a href="#ref-for-valdef-media-pointer-none①">7.1. 
Pointing Device Quality: the pointer feature</a>
    <li><a href="#ref-for-valdef-media-pointer-none②">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-pointer-coarse">
   <b><a href="#valdef-media-pointer-coarse">#valdef-media-pointer-coarse</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-pointer-coarse">7.1. 
Pointing Device Quality: the pointer feature</a> <a href="#ref-for-valdef-media-pointer-coarse①">(2)</a> <a href="#ref-for-valdef-media-pointer-coarse②">(3)</a> <a href="#ref-for-valdef-media-pointer-coarse③">(4)</a> <a href="#ref-for-valdef-media-pointer-coarse④">(5)</a> <a href="#ref-for-valdef-media-pointer-coarse⑤">(6)</a> <a href="#ref-for-valdef-media-pointer-coarse⑥">(7)</a>
    <li><a href="#ref-for-valdef-media-pointer-coarse⑦">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a> <a href="#ref-for-valdef-media-pointer-coarse⑧">(2)</a> <a href="#ref-for-valdef-media-pointer-coarse⑨">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="valdef-media-pointer-fine">
   <b><a href="#valdef-media-pointer-fine">#valdef-media-pointer-fine</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-media-pointer-fine">7.1. 
Pointing Device Quality: the pointer feature</a> <a href="#ref-for-valdef-media-pointer-fine①">(2)</a> <a href="#ref-for-valdef-media-pointer-fine②">(3)</a>
    <li><a href="#ref-for-valdef-media-pointer-fine③">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-hover">
   <b><a href="#descdef-media-hover">#descdef-media-hover</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-hover①">7. 
Interaction Media Features</a> <a href="#ref-for-descdef-media-hover②">(2)</a> <a href="#ref-for-descdef-media-hover③">(3)</a> <a href="#ref-for-descdef-media-hover④">(4)</a> <a href="#ref-for-descdef-media-hover⑤">(5)</a> <a href="#ref-for-descdef-media-hover⑥">(6)</a> <a href="#ref-for-descdef-media-hover⑦">(7)</a>
    <li><a href="#ref-for-descdef-media-hover⑧">7.2. 
Hover Capability: the hover feature</a> <a href="#ref-for-descdef-media-hover⑨">(2)</a> <a href="#ref-for-descdef-media-hover①⓪">(3)</a> <a href="#ref-for-descdef-media-hover①①">(4)</a> <a href="#ref-for-descdef-media-hover①②">(5)</a> <a href="#ref-for-descdef-media-hover①③">(6)</a> <a href="#ref-for-descdef-media-hover①④">(7)</a>
    <li><a href="#ref-for-descdef-media-hover①⑤">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a>
    <li><a href="#ref-for-descdef-media-hover①⑥"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-any-pointer">
   <b><a href="#descdef-media-any-pointer">#descdef-media-any-pointer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-any-pointer①">7. 
Interaction Media Features</a> <a href="#ref-for-descdef-media-any-pointer②">(2)</a> <a href="#ref-for-descdef-media-any-pointer③">(3)</a> <a href="#ref-for-descdef-media-any-pointer④">(4)</a>
    <li><a href="#ref-for-descdef-media-any-pointer⑤">7.1. 
Pointing Device Quality: the pointer feature</a> <a href="#ref-for-descdef-media-any-pointer⑥">(2)</a>
    <li><a href="#ref-for-descdef-media-any-pointer⑦">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a> <a href="#ref-for-descdef-media-any-pointer⑧">(2)</a> <a href="#ref-for-descdef-media-any-pointer⑨">(3)</a> <a href="#ref-for-descdef-media-any-pointer①⓪">(4)</a> <a href="#ref-for-descdef-media-any-pointer①①">(5)</a> <a href="#ref-for-descdef-media-any-pointer①②">(6)</a> <a href="#ref-for-descdef-media-any-pointer①③">(7)</a> <a href="#ref-for-descdef-media-any-pointer①④">(8)</a>
    <li><a href="#ref-for-descdef-media-any-pointer①⑤"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-any-hover">
   <b><a href="#descdef-media-any-hover">#descdef-media-any-hover</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-any-hover①">7. 
Interaction Media Features</a> <a href="#ref-for-descdef-media-any-hover②">(2)</a> <a href="#ref-for-descdef-media-any-hover③">(3)</a> <a href="#ref-for-descdef-media-any-hover④">(4)</a>
    <li><a href="#ref-for-descdef-media-any-hover⑤">7.2. 
Hover Capability: the hover feature</a>
    <li><a href="#ref-for-descdef-media-any-hover⑥">7.3. 
All Available Interaction Capabilities: the any-pointer and any-hover features</a> <a href="#ref-for-descdef-media-any-hover⑦">(2)</a> <a href="#ref-for-descdef-media-any-hover⑧">(3)</a> <a href="#ref-for-descdef-media-any-hover⑨">(4)</a> <a href="#ref-for-descdef-media-any-hover①⓪">(5)</a>
    <li><a href="#ref-for-descdef-media-any-hover①①"> Changes Since Media Queries Level 3</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-device-width">
   <b><a href="#descdef-media-device-width">#descdef-media-device-width</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-device-width">8. 
Appendix A: Deprecated Media Features</a>
    <li><a href="#ref-for-descdef-media-device-width①"> device-width</a> <a href="#ref-for-descdef-media-device-width②">(2)</a>
    <li><a href="#ref-for-descdef-media-device-width③"> device-aspect-ratio</a>
    <li><a href="#ref-for-descdef-media-device-width④"> Changes Since Media Queries Level 3</a>
    <li><a href="#ref-for-descdef-media-device-width⑤">9. Privacy and Security Considerations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-device-height">
   <b><a href="#descdef-media-device-height">#descdef-media-device-height</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-device-height">8. 
Appendix A: Deprecated Media Features</a>
    <li><a href="#ref-for-descdef-media-device-height①"> device-height</a> <a href="#ref-for-descdef-media-device-height②">(2)</a>
    <li><a href="#ref-for-descdef-media-device-height③"> Changes Since Media Queries Level 3</a>
    <li><a href="#ref-for-descdef-media-device-height④">9. Privacy and Security Considerations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descdef-media-device-aspect-ratio">
   <b><a href="#descdef-media-device-aspect-ratio">#descdef-media-device-aspect-ratio</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descdef-media-device-aspect-ratio">8. 
Appendix A: Deprecated Media Features</a>
    <li><a href="#ref-for-descdef-media-device-aspect-ratio①"> Changes Since Media Queries Level 3</a>
    <li><a href="#ref-for-descdef-media-device-aspect-ratio②">9. Privacy and Security Considerations</a>
   </ul>
  </aside>
<script>/* script-caniuse-panel */

            window.addEventListener("load", function(){
                var panels = [].slice.call(document.querySelectorAll(".caniuse-status"));
                for(var i = 0; i < panels.length; i++) {
                    var panel = panels[i];
                    var dfn = document.querySelector("#" + panel.getAttribute("data-dfn-id"));
                    var rect = dfn.getBoundingClientRect();
                    panel.style.top = (window.scrollY + rect.top) + "px";
                }
            });
            document.body.addEventListener("click", function(e) {
                if(e.target.classList.contains("caniuse-panel-btn")) {
                    e.target.parentNode.classList.toggle("wrapped");
                }
            });</script>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>